internal MoveBehaviour CreateMoveBehaviour(Unit unit, string behaviour) { if (moveBehaviourMap.ContainsKey(behaviour)) { return moveBehaviourMap[behaviour].CreateInstance(unit); } throw new Exception("Behaviour with the name " + behaviour + " Not Found"); }
public MoveBehaviour CreateInstance(Unit unit) { return new FallingMoveBehaviour(unit); }
public FallingMoveBehaviour(Unit unit) { this.unit = unit; }
public DrawBehaviour CreateInstance(Unit unit) { return new FlyingDrawBehaviour(unit); }
public FlyingDrawBehaviour(Unit unit) { this.unit = unit; }
public void addUnitToMap(String name, Unit unit) { unitMap.Add(name, unit); }