blob: 556e918713c7c41f982052c8538601b7eff40418 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
namespace V3.Objects
{
/// <summary>
/// A game object which is placed on the map.
/// </summary>
public interface IGameObject
{
Vector2 Position { get; set; }
/// <summary>
/// A unique ID for this game object, with which it can be identified.
/// All implementations should use the IdGenerator to generate this ID.
/// </summary>
int Id { get; }
/// <summary>
/// Draws the game object on the screen.
/// </summary>
/// <param name="spriteBatch">Sprite batch used for drawing.</param>
void Draw(SpriteBatch spriteBatch);
/// <summary>
/// The size of the object.
/// </summary>
Rectangle BoundaryRectangle { get; }
/// <summary>
/// Loads needed graphics.
/// </summary>
/// <param name="contentManager">Content manager used. </param>
void LoadContent(ContentManager contentManager);
/// <summary>
/// Returns the object instance without modifications.
/// </summary>
/// <returns>This object.</returns>
IGameObject GetSelf();
}
}
|