Example #1
0
        public static bool CheckIsUFODead()
        {
            UFOManager pMan = UFOManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            return(pMan.pUFO.isDead);
        }
Example #2
0
        public static void DeactiveUFO()
        {
            UFOManager pMan = UFOManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.pUFO.isDead = true;
            SoundManager.Play(Sound.Name.UFO_High);
            pMan.pUFO.SetPos(0.0f, -50);
        }
Example #3
0
        public static void ActivateUFO()
        {
            UFOManager pMan = UFOManager.PrivGetInstance();

            Debug.Assert(pMan != null);

            pMan.pUFO.isDead = false;

            int lottery = pMan.pRandom.Next(2);

            if (lottery == 0)
            {
                pMan.pUFO.SetPos(40.0f, Constant.WINDOW_HEIGHT - 130);
                pMan.pUFO.SetMoveToRight();
            }
            else
            {
                pMan.pUFO.SetPos(Constant.WINDOW_WIDTH - 40.0f, Constant.WINDOW_HEIGHT - 130);
                pMan.pUFO.SetMoveToLeft();
            }
            SoundManager.Play(Sound.Name.UFO_Low);
        }