public MoveBehaviour CreateMoveBehaviour(Unit unit) { switch (unit.GetType().ToString()) { case "duckhunt.Model.DuckEasy": return new StraightMoveBehaviour(unit); case "duckhunt.Model.DuckMedium": return new StraightMoveBehaviour(unit); default: return null; } }
public DrawBehaviour CreateDrawBehaviour(Unit unit) { switch (unit.GetType().ToString()) { case "duckhunt.Model.DuckEasy": return new DrawBehaviour(Canvas, unit); case "duckhunt.Model.DuckMedium": return new DrawBehaviour(Canvas, unit); default: return null; } }
public void Remove(Unit unit) { behaviours = behaviours.Where(b => b.Unit != unit).ToList(); }
public MoveBehaviour(Unit unit) { }
public StraightMoveBehaviour(Unit unit) { Unit = unit; }
public LineMoveBehaviour(Unit unit) { Unit = unit; }
public DrawBehaviour(Form1 canvas, Unit unit) { Canvas = canvas; Unit = unit; }