Beispiel #1
0
        public Enemy(Pacman pacman, EnemyType type, Point location, Game.Level level)
            : this()
        {
            SetSpeed(level);
            this.Location = location;
            _pacman = pacman;
            EnemyType = type;
            _timerCheck = new Timer();
            _timerCheck.Interval = 20;
            _timerCheck.Tick += _timerCheck_Tick;
            _timerCheck.Start();

            AllowedLocationsMap = pacman.AllowedLocationsMap;
        }
Beispiel #2
0
        public void SetPackMan()
        {
            Pacman = new Pacman(Dots, AllowedMapPlaces());
            Pacman.Exit = Exit;

            // if entrance is not initialize
            if (Entrance == Point.Empty)
                Entrance = new Point(Step, 2*Step);

            Pacman.Entrance = Entrance;
        }