예제 #1
0
 private void Spawn(Vector2 spawnLocation)
 {
     if (Map.GetCell(spawnLocation).Blocked)
     {
         throw new ArgumentException("Tried to spawn in occupied or blocked cell.");
     }
     else
     {
         Map.GetCell(spawnLocation).Actor = Parent;
     }
 }
예제 #2
0
		public MovementComponent (GameObject parent, GameMap map) : base (parent)
		{
			Map = map;
			Map.GetCell (Parent.GetComponent<LocationComponent> ().Location).Actor = parent;
		}
예제 #3
0
 public MovementComponent(GameObject parent, GameMap map) : base(parent)
 {
     Map = map;
     Map.GetCell(Parent.GetComponent <LocationComponent> ().Location).Actor = parent;
 }