예제 #1
0
 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;
     }
 }
예제 #2
0
 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;
     }
 }