Exemplo n.º 1
0
        public void Spawn(float t_x, float t_y, int index)
        {
            this.x           = t_x;
            this.y           = t_y;
            this.m_fHorSpeed = 0;
            this.m_fVerSpeed = 0;

            this.m_iIndex = index;

            this.m_fDirection = 0;

            this.m_fVelocity = 0;

            m_spSprite = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            InstanceSpawn();
        }
Exemplo n.º 2
0
        public override void InstanceSpawn()
        {
            this.m_iScoreDigits = 8;

            this.m_sprScoreDigit = new CSprite[m_iScoreDigits];

            this.m_sprHiScoreDigit = new CSprite[m_iScoreDigits];

            this.m_iScoreDigit = new int[m_iScoreDigits];

            this.m_iHiScoreDigit = new int[m_iScoreDigits];

            this.m_iScoreToAdd = 100000000;

            m_iCreationTicks = 240;

            this.m_sInstanceType = "objHUD";

            m_sprOneUpMeter = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprUpSymbol = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprMultiShotIcon = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprRapidFireIcon = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprHiScore = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprPaused = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            m_sprGameOver = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

            for (int i = 0; i < m_iScoreDigits; i++)
            {
                m_iScoreDigit[i]   = 0;
                m_sprScoreDigit[i] = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);

                m_iHiScoreDigit[i]   = 0;
                m_sprHiScoreDigit[i] = new CSprite(CObjectManager.Instance.m_txTexturePage, CObjectManager.Instance.m_sbSpriteBatch);
            }

            SetHiScore();

            CMusicPlayer.Instance.Play(CMusicPlayer.MENU_SONG);
        }