コード例 #1
0
    void Update()
    {
        if (hInGameScriptCS.isGamePaused() == true)
        {
            return;
        }

        if (hInGameScriptCS.isEnergyZero())
        {
            if (DeathScene())
            {
                return;
            }
        }

        if (hInGameScriptCS.isCustomMenuEnabled())
        {
            getClicks();           //get taps/clicks for pause menu etc.
        }
        if (mecanimEnabled)        //reset parameters for next frame
        {
            aPlayerMecAnim.SetBool("StrafeLeftAnim", false);
            aPlayerMecAnim.SetBool("StrafeRightAnim", false);
        }

        if (bControlsEnabled)
        {
            SwipeMovementControl();
        }
    }    //end of update()
コード例 #2
0
ファイル: CameraControllerCS.cs プロジェクト: lovigame/alalei
    void Update()
    {
        if (hInGameScriptCS.isGamePaused() == true)
        {
            return;
        }

        if (hInGameScriptCS.isEnergyZero())             //switch to death camera state on depletion of energy
        {
            iCameraState = 2;
        }
    }
コード例 #3
0
 /*
  *	FUNCTION: Called when player bumps into an obstacle side-ways
  */
 void OnCollisionEnter(Collision collision)
 {
     if (hInGameScriptCS.isEnergyZero())
     {
         return;
     }
     else
     {
         hPlayerFrontColliderScriptCS.deactivateCollider();  //pause front collision detection till stumble is processed
         hControllerScriptCS.processStumble();               //handle the collision
     }
 }