-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBaseEntity.cs
More file actions
34 lines (31 loc) · 837 Bytes
/
Copy pathBaseEntity.cs
File metadata and controls
34 lines (31 loc) · 837 Bytes
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
namespace IceFebruary
{
/// <summary>
/// Basic abstract entity class.
/// Simplest implementation of the entity interface.
/// </summary>
public abstract class BaseEntity : IBaseEntity
{
protected bool _enabled = true;
/// <summary>
/// True, if the entity is destroyed.
/// Don't use destroyed entities.
/// </summary>
public bool Destroyed { get; protected set; } = false;
/// <summary>
/// True, if the entity is enabled.
/// </summary>
public virtual bool Enabled
{
get => _enabled;
set => _enabled = value;
}
/// <summary>
/// Destroying an entity.
/// </summary>
public virtual void Destroy()
{
Destroyed = true;
}
}
}