riversong code showcase
This commit is contained in:
14
Source/Riversong/Game/CommonServices/Entities/Entity.cs
Normal file
14
Source/Riversong/Game/CommonServices/Entities/Entity.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace DanieleMarotta.RiversongCodeShowcase
|
||||
{
|
||||
public class Entity
|
||||
{
|
||||
public const int InvalidId = 0;
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public static T Create<T>(int id) where T : Entity, new()
|
||||
{
|
||||
return new T { Id = id };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user