Beispiel #1
0
 public virtual void Render()
 {
     m_spSprite.Update(x, y, m_fDirection, 0, 0, 0.0f);
     m_spSprite.Render();
 }
Beispiel #2
0
        public override void Render()
        {
            m_sprHiScore.Update(10, 10, 0, 19, 0, 1.0f);
            m_sprHiScore.Render();

            for (int i = 0; i < m_iScoreDigits; i++)
            {
                m_sprHiScoreDigit[i].Update(47 + ((m_iScoreDigits - 1) * 6) - (i * 6), 10, 0, 20, m_iHiScoreDigit[i], 1.0f);
                m_sprHiScoreDigit[i].Render();
            }

            for (int i = 0; i < m_iScoreDigits; i++)
            {
                m_sprScoreDigit[i].Update(10 + ((m_iScoreDigits - 1) * 8) - (i * 8), 20, 0, 6, m_iScoreDigit[i], 1.0f);
                m_sprScoreDigit[i].Render();
            }

            m_sprOneUpMeter.Update(10, 35, 0, 6, CObjectManager.Instance.m_iOneUps, 1.0f);
            m_sprOneUpMeter.Render();

            m_sprUpSymbol.Update(18, 35, 0, 15, 0, 1.0f);
            m_sprUpSymbol.Render();

            if (CObjectManager.Instance.m_bHasMultiShot && CObjectManager.Instance.m_bMultiShotEnding)
            {
                m_bRenderMultiShot = !m_bRenderMultiShot;
            }
            else if (CObjectManager.Instance.m_bHasMultiShot)
            {
                m_bRenderMultiShot = true;
            }
            else
            {
                m_bRenderMultiShot = false;
            }

            if (CObjectManager.Instance.m_bHasRapidFire && CObjectManager.Instance.m_bRapidFireEnding)
            {
                m_bRenderRapidFire = !m_bRenderRapidFire;
            }
            else if (CObjectManager.Instance.m_bHasRapidFire)
            {
                m_bRenderRapidFire = true;
            }
            else
            {
                m_bRenderRapidFire = false;
            }

            if (m_bRenderMultiShot)
            {
                m_sprMultiShotIcon.Update(17, 57, 0, 12, 0, 1.0f);
                m_sprMultiShotIcon.Render();
            }

            if (m_bRenderRapidFire)
            {
                m_sprRapidFireIcon.Update(33, 57, 0, 13, 0, 1.0f);
                m_sprRapidFireIcon.Render();
            }

            if (m_bPaused)
            {
                m_sprPaused.Update(400, 240, 0, 21, 0, 1.0f);
                m_sprPaused.Render();
            }

            if (!CObjectManager.Instance.m_bHasStarted)
            {
                //game logo
                m_sprGameOver.Update(400, 190, 0, 22, 0, 1.0f);
                m_sprGameOver.Render();

                //push start
                m_sprGameOver.Update(400, 300, 0, 16, 0, 1.0f);
                m_sprGameOver.Render();

                //my logo
                m_sprGameOver.Update(10, 480 - 44, 0, 18, 0, 1.0f);
                m_sprGameOver.Render();
            }
            else if (m_bGameOver)
            {
                m_sprGameOver.Update(329, 240, 0, 17, 0, 1.0f);
                m_sprGameOver.Render();

                m_sprGameOver.Update(404, 240, 0, 17, 1, 1.0f);
                m_sprGameOver.Render();

                if (CObjectManager.Instance.m_iScore > CObjectManager.Instance.m_iHiScore)
                {
                    m_sprGameOver.Update(400, 260, 0, 23, 1, 1.0f);
                    m_sprGameOver.Render();
                }
            }
        }