Esempio n. 1
0
        public Unit(MoveContainer mc, DrawContainer dc, BehaviourFactory bf, MainWindow window)
        {
            moveContainer = mc;
            drawContainer = dc;
            behaviourFactory = bf;
            this.window = window;

            moveBehaviour = behaviourFactory.CreateMoveBehaviour(this, "flying");
            drawBehaviour = behaviourFactory.CreateDrawBehaviour(this, "flying");
            moveContainer.Add(moveBehaviour);
            drawContainer.Add(drawBehaviour);

            this.window = window;
            dispatcher = Dispatcher.CurrentDispatcher;
        }