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()
void Update() { if (hInGameScriptCS.isGamePaused() == true) { return; } if (hInGameScriptCS.isEnergyZero()) //switch to death camera state on depletion of energy { iCameraState = 2; } }
/* * 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 } }