Beispiel #1
0
        /// <summary>
        /// Update
        /// </summary>
        public override void Update()
        {
            base.Update();

            float c0 = Mathf.Sin(Time.time * 2) + 1.0f;

            c0 /= 2.0f;
            c0  = (c0 * (255 - 125)) + 125;

            if (!TransitionDone())
            {
                return;
            }

            if (RB.ButtonPressed(RB.BTN_ABXY, RB.PLAYER_ANY) || RB.ButtonPressed(RB.BTN_POINTER_ANY, RB.PLAYER_ANY))
            {
                SceneGame scene = new SceneGame();
                scene.Initialize();
                SuperFlagRun game = (SuperFlagRun)RB.Game;
                game.SwitchScene(scene);

                RB.SoundPlay(SuperFlagRun.SOUND_START_GAME);
            }

            mFlagOne.Update();
            mFlagTwo.Update();
        }
Beispiel #2
0
        /// <summary>
        /// Update
        /// </summary>
        public override void Update()
        {
            base.Update();

            mPlayerOne.Update();
            mPlayerTwo.Update();
            mFlagOne.Update();
            mFlagTwo.Update();

            if (mWinningPlayer != 0)
            {
                if (mTimeoutUntilReset > 0)
                {
                    mTimeoutUntilReset -= Time.deltaTime;

                    if (mTimeoutUntilReset <= 0)
                    {
                        SceneTitle scene = new SceneTitle();
                        scene.Initialize();
                        SuperFlagRun game = (SuperFlagRun)RB.Game;
                        game.SwitchScene(scene);
                    }
                }
            }
        }