feat: ticks, state authority, event authority

This commit is contained in:
2022-05-14 10:36:21 +04:00
parent 053d5c9383
commit f88aa728c3
16 changed files with 163 additions and 200 deletions
+6 -4
View File
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using Ragon.Common;
namespace Ragon.Core;
@@ -8,13 +8,15 @@ public class Entity
public int EntityId { get; private set; }
public uint OwnerId { get; private set; }
public ushort EntityType { get; private set; }
public byte[] State { get; set; }
public Dictionary<int, byte[]> Properties { get; set; }
public RagonAuthority Authority { get; private set; }
public EntityState State { get; private set; }
public Entity(uint ownerId, ushort entityType)
public Entity(uint ownerId, ushort entityType, RagonAuthority stateAuthority, RagonAuthority eventAuthority)
{
OwnerId = ownerId;
EntityType = entityType;
EntityId = _idGenerator++;
State = new EntityState(stateAuthority);
Authority = eventAuthority;
}
}