private void onButtonPressed(Signal signal) { ButtonPressedSignal buttonPressedSignal = (ButtonPressedSignal)signal; if (buttonPressedSignal.InputButton == InputButton.SPACE) { SceneManager.LoadScene("MainScene"); } }
private void onButtonPressed(Signal signal) { ButtonPressedSignal buttonPressedSignal = (ButtonPressedSignal)signal; if (buttonPressedSignal.InputButton == InputButton.SPACE) { SignalManager.Inst.RemoveListener <ButtonPressedSignal>(onButtonPressed); myAnimator.SetTrigger("FlyIn"); } }
private void onButtonPressed(Signal signal) { ButtonPressedSignal buttonPressedSignal = (ButtonPressedSignal)signal; if (buttonPressedSignal.InputButton == InputButton.SPACE) { SignalManager.Inst.RemoveListener <ButtonPressedSignal>(onButtonPressed); Destroy(gameObject); } }
private void onButtonPressed(Signal signal) { ButtonPressedSignal buttonPressedSignal = (ButtonPressedSignal)signal; if (mainCharacter.SetLandingPosition()) { nextState = new PlayerJumpState(mainCharacter); } else if (buttonPressedSignal.InputButton == InputButton.LEFT) { nextState = new PlayerIdleState(mainCharacter); } }
private void onButtonPressed(Signal signal) { ButtonPressedSignal buttonPressedSignal = (ButtonPressedSignal)signal; if (buttonPressedSignal.InputButton == InputButton.LEFTCLICK) { if (mainCharacter.SetLandingPosition()) { if (mainCharacter.LandingPostion.transform.parent.name == "Planet") { nextState = new PlayerHitPlanetState(mainCharacter); } else { nextState = new PlayerJumpState(mainCharacter); } } else { nextState = new PlayerFlailState(mainCharacter); } } }