1 Star 0 Fork 0

茶密/engenious

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
IGame.cs 2.97 KB
一键复制 编辑 原始数据 按行查看 历史
jvbsl 提交于 2021-02-14 14:41 . Big cleanup and change to nullable project
using System;
using System.Drawing;
using engenious.Content;
using engenious.Graphics;
namespace engenious
{
/// <summary>
/// Base interface for all game types.
/// </summary>
public interface IGame : IDisposable
{
/// <summary>
/// Occurs when a key is pressed while the <see cref="Game"/> is in focus.
/// </summary>
event KeyPressDelegate? KeyPress;
/// <summary>
/// Occurs when the <see cref="Game"/> is getting focus.
/// </summary>
event EventHandler? Activated;
/// <summary>
/// Occurs when the <see cref="Game"/> is losing focus.
/// </summary>
event EventHandler? Deactivated;
/// <summary>
/// Occurs when the <see cref="Game"/> is exiting.
/// </summary>
event EventHandler? Exiting;
/// <summary>
/// Occurs when the <see cref="Game"/> game rendering view is being resized.
/// </summary>
event EventHandler? Resized;
/// <summary>
/// Gets a <see cref="ContentManagerBase"/> for basic game content management.
/// </summary>
ContentManagerBase Content { get; }
/// <summary>
/// Gets or sets whether the mouse cursor is visible while on the rendering view.
/// </summary>
bool IsMouseVisible { get; set; }
/// <summary>
/// Gets or sets whether the mouse cursor is grabbed while on the rendering view.
/// </summary>
bool IsCursorGrabbed { get; set; }
/// <summary>
/// Gets whether the rendering view is currently in focus.
/// </summary>
bool IsActive { get; }
/// <summary>
/// Gets a collection of game components associated with this <see cref="Game"/>.
/// </summary>
GameComponentCollection Components { get; }
/// <summary>
/// Gets a rendering view associated with this <see cref="IGame"/>.
/// </summary>
IRenderingSurface RenderingSurface { get; }
/// <summary>
/// Called when <see cref="Game"/> related content should be loaded.
/// </summary>
void LoadContent();
/// <summary>
///Called when <see cref="Game"/> related content should be unloaded.
/// </summary>
void UnloadContent();
/// <summary>
/// Executes a single update tick.
/// </summary>
/// <param name="gameTime">Contains the elapsed time since the last update, as well as total elapsed time.</param>
void Update(GameTime gameTime);
/// <summary>
/// Executes a single frame render.
/// </summary>
/// <param name="gameTime">Contains the elapsed time since the last render, as well as total elapsed time.</param>
void Draw(GameTime gameTime);
/// <summary>
/// Gets the <see cref="GraphicsDevice"/> associated with this game.
/// </summary>
GraphicsDevice GraphicsDevice { get; }
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/long33/engenious.git
git@gitee.com:long33/engenious.git
long33
engenious
engenious
develop

搜索帮助