public UnitController(Game game, String player, UnitData initialData)
            : base(game)
        {
            var warGame = game as Startup;
            this.player = player;
            this.initialData = initialData;

            unit = new StandardUnit(GameData.Resolver, this);

            warGame.MouseClick += (s, args) => CheckMouseClick(s, args as ClickEventArgs);
        }
Esempio n. 2
0
        public UnitView(Game game, String player, Model model, UnitData initialData, Unit unit)
            : base(game)
        {
            this.model = model;
            this.unit = unit;
            this.initialData = initialData;
            this.player = player;
            wave = new SineWave(AMPLITUDE, FREQUENCY, OFFSET);
            waiting = false;

            unit.Waiting += () => waiting = true;
            unit.DoneWaiting += () => waiting = false;
        }