示例#1
0
        private void Init()
        {
            DestinationTower = CreateEndTower();
            Enemies          = new Queue <Enemy>();

            for (int i = 0; i < ENEMY_COUNT; i++)
            {
                Enemies.Enqueue(CreateEnemy());
            }
        }
示例#2
0
        public Enemy(Texture2D image, Vector2 position, StartTower start, EndTower destination, int frameCount)
            : base(image, position, frameCount)
        {
            this.start       = start;
            this.destination = destination;
            CanMove          = false;

            direction = destination.Position - position;
            direction.Normalize();
        }