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; } }
public MovementComponent (GameObject parent, GameMap map) : base (parent) { Map = map; Map.GetCell (Parent.GetComponent<LocationComponent> ().Location).Actor = parent; }
public MovementComponent(GameObject parent, GameMap map) : base(parent) { Map = map; Map.GetCell(Parent.GetComponent <LocationComponent> ().Location).Actor = parent; }