public RedDuck(MainWindow window, int top, DuckController controller) : base(window, top, controller) { this.window = window; this.top = top; this.controller = controller; }
public GameController(MainWindow window) { this.window = window; levelState = new Level(window); levelState.getLevelOne(); duckController = new DuckController(window, this); }
public GameController(MainWindow window) { unitFactory = UnitFactory.Instance; behaviourFactory = BehaviourFactory.Instance; moveContainer = new MoveContainer(); drawContainer = new DrawContainer(); units = new ArrayList(); this.window = window; timer = new Timer(); dispatcher = Dispatcher.CurrentDispatcher; currentLevel = new BaseLevelState(this); //maak level 1 aan currentLevel.NextLevel(); Crow.AddUnitToFactory(); Duck.AddUnitToFactory(); Unit unit1 = unitFactory.CreateUnit("Duck", moveContainer, drawContainer, behaviourFactory, window); units.Add(unit1); //Thread t = new Thread(new ThreadStart(gameLoop)); //t.Start(); Unit unit2 = unitFactory.CreateUnit("Crow", moveContainer, drawContainer, behaviourFactory, window); units.Add(unit2); t2 = new Thread(new ThreadStart(gameLoop)); t2.Start(); }
public DuckController(MainWindow window, GameController gameController) { this.window = window; this.gameController = gameController; ducks = new ArrayList(); rnd = new Random(); dispatcher = Dispatcher.CurrentDispatcher; duckFactory = new DuckFactory(window, this); }
public Level(MainWindow window) { this.window = window; levelOne = new LevelOne(this); levelTwo = new LevelTwo(this); levelThree = new LevelThree(this); bossLevel = new BossLevel(this); setLevelState(levelOne); dispatcher = Dispatcher.CurrentDispatcher; }
public Duck(MainWindow window, int top, DuckController controller) { dispatcher = Dispatcher.CurrentDispatcher; aliveDuck = new AliveDuck(this); shotDuck = new ShotDuck(this); deadDuck = new DeadDuck(this); this.controller = controller; duckState = aliveDuck; }
public Duck(MoveContainer mc, DrawContainer dc, BehaviourFactory bf, MainWindow window) : base(mc, dc, bf, window) { //rnd = new Random(); size = 40; x = 0; y = rnd.Next(26, 300); color = Brushes.PowderBlue; velocity = 1.0F; heading = 1.5F; InitUnit(); }
public override Unit CreateInstance(MoveContainer mc, DrawContainer dc, BehaviourFactory bf, MainWindow window) { return new Duck(mc, dc, bf, window); }