void Update() { currentGameState = GameManager._GAME_STATE; if ((currentGameState == GameManager.eGameState.DeskWithPatient) && firstTimeInDeskWithPatientState) { patientInfoArrow.SetActive(true); } else if ((currentGameState == GameManager.eGameState.IDView) && (firstTimeInIDViewStateState)) { switchBetweenPatientInfoArrow.SetActive(true); } else if ((currentGameState == GameManager.eGameState.IDView || currentGameState == GameManager.eGameState.HealthInformationView) && firstTimeBeforeDecision) { makeDecisionArrow.SetActive(true); } else if ((currentGameState == GameManager.eGameState.DecisionView) && (firstDecision)) { decisionIndications.SetActive(true); firstDecision = false; } if (crewMemberDisplayArrow.activeInHierarchy && levelDisplayArrow.activeInHierarchy && (GameManager._GAME_STATE == GameManager.eGameState.IDView || GameManager._GAME_STATE == GameManager.eGameState.DecisionView)) { crewMemberDisplayArrow.SetActive(false); levelDisplayArrow.SetActive(false); } }
void OnGameStateChanged(GameManager.eGameState newGameState) { if (newGameState == GameManager.eGameState.Playing) { Quaternion direction = Quaternion.Euler((float)Random.Range(0, 300), ( float )Random.Range(0, 300), ( float )Random.Range(0, 300)); //Launch in random direction RigidBodyComponent.AddForce(direction.eulerAngles * BallLaunchPower); } }
private void StateChanged(GameManager.eGameState state) { switch (state) { case GameManager.eGameState.RUNNING: //transform.position = startPos; CVC.Follow = camFollow; CVC.LookAt = camFollow; break; case GameManager.eGameState.GAMEOVER: CVC.Follow = null; CVC.LookAt = null; SS.Shake(); break; } }
private void SwitchState(GameManager.eGameState state) { GameManager.Singleton().ChangeState(state); }
private void OnStateChanged(GameManager.eGameState state) { follow.enabled = state == GameManager.eGameState.RUNNING; }