Пример #1
0
        public void Update()
        {
            //NOTE: Enemy movement done in Game1

            //Update bounding sphere position and scale
            colSphere.Center = (position + new Vector3(0, 0, 5));

            //Fire his attack and update his collision sphere
            if (isBoss)
            {
                //Fire Attack
                if (onScreenBossAttacks[0] == null)
                {
                    onScreenBossAttacks[0] = new BossAttack(position, rotation);

                    //Play sound effect
                    Game1.bossAttackSound.Play();
                }

                //Update the collision sphere to better fit the boss
                colSphere.Center = (position + new Vector3(0, 0, -20));
                colSphere.Radius = scale * 5;
            }
        }
Пример #2
0
        public void Update()
        {
            //NOTE: Enemy movement done in Game1

            //Update bounding sphere position and scale
            colSphere.Center = (position + new Vector3(0, 0, 5));

            //Fire his attack and update his collision sphere
            if (isBoss)
            {
                //Fire Attack
                if (onScreenBossAttacks[0] == null)
                {
                    onScreenBossAttacks[0] = new BossAttack(position, rotation);

                    //Play sound effect
                    Game1.bossAttackSound.Play();
                }

                //Update the collision sphere to better fit the boss
                colSphere.Center = (position + new Vector3(0, 0, -20));
                colSphere.Radius = scale * 5;
            }
        }