Example #1
0
 public bool ObjectSpawnedAt(Entity entity, Vector3 vec)
 {
     if (pos2ObjMap.ContainsKey(vec2Pos(vec)))
     {
         return(false);
     }
     pos2ObjMap [vec2Pos(vec)] = new PositionContent(entity);
     return(true);
 }
Example #2
0
 public bool ObjectMovesTo(Entity entity, Vector3 start, Vector3 end)
 {
     if (pos2ObjMap [vec2Pos(end)] != null)
     {
         return(false);
     }
     if (pos2ObjMap [vec2Pos(start)] == null || pos2ObjMap [vec2Pos(start)].entity != entity)
     {
         return(false);
     }
     pos2ObjMap.Remove(vec2Pos(start));
     pos2ObjMap [vec2Pos(end)] = new PositionContent(entity);
     return(true);
 }