Exemplo n.º 1
0
 /// <summary>
 /// When realEntity is left null, the Entity will register itself. Else it will register whoever is the realEntity
 /// WARNING: Don't use the RealEntity if you are inheriting from this class.
 /// </summary>
 public Entity(IEntity realEntity = null, string[] tags = null)
 {
     database        = Ramses.Confactory.ConfactoryFinder.Instance.Give <ConEntityDatabase>();
     this.trueEntity = (realEntity == null) ? this : realEntity;
     if (tags != null)
     {
         allTags = new List <string>(tags);
     }
     RegisterToDatabase(trueEntity);
 }
Exemplo n.º 2
0
 public virtual void Dispose()
 {
     database.UnRegisterEntity(trueEntity);
     database = null;
 }