Esempio n. 1
0
        protected override void RunningUpdate()
        {
            if (Input.GetButtonDown("PauseTime"))
            {
                GlobalTimeManager.getInstance().Pause();
                indicator.endCountDown();

                return;
            }

            if (!m_Jump)
            {
                m_Jump = CrossPlatformInputManager.GetButtonDown("Jump");
            }

            // read inputs
            h      = CrossPlatformInputManager.GetAxis("Horizontal");
            v      = CrossPlatformInputManager.GetAxis("Vertical");
            crouch = Input.GetKey(KeyCode.C);
        }
Esempio n. 2
0
        protected override void PausedUpdate()
        {
            if (Input.GetButtonDown("PauseTime"))
            {
                GlobalTimeManager.getInstance().Resume();
                return;
            }

            if (Input.GetButtonDown("DropItem"))
            {
                indicator.startCountDown();
            }
            else if (Input.GetButtonUp("DropItem"))
            {
                indicator.endCountDown();
            }

            h = CrossPlatformInputManager.GetAxisRaw("Horizontal");
            v = CrossPlatformInputManager.GetAxisRaw("Vertical");
            indicator.Move(new Vector2(h * moveSpeed.x, v * moveSpeed.y));
        }