void UpdateToRightLane() { transform.position = Vector3.Lerp(this.transform.position, LerpRightLocation.transform.position, laneSwitchSpeed); //for up clicks on (LeftHand) left if (SteamVR_Actions._default.LeftClick.GetStateDown(SteamVR_Input_Sources.LeftHand)) { Pulse(.1f, 150, 25, SteamVR_Input_Sources.LeftHand); //Debug.Log("LeftClickPressed"); currentState = FSMStateMovement_Waypoint.MidLane; } }
public void OnCollisionEnter(Collision collision) { if (collision.gameObject.CompareTag("Obstacle")) { collision.gameObject.tag = "Untagged"; int check = heartsRemaining; if (check > 1) { heartsRemaining = heartsRemaining - 1; Destroy(Hearts[check - 1]); Pulse(.5f, 150, 125, SteamVR_Input_Sources.LeftHand); Pulse(.5f, 150, 125, SteamVR_Input_Sources.RightHand); } else if (check == 1) { heartsRemaining = heartsRemaining - 1; Destroy(Hearts[check - 1]); currentState = FSMStateMovement_Waypoint.GameOver; this.GetComponent <PlayerMotor>().GameOverSpeed(); LerpGameObject.GetComponent <PlayerMotor>().GameOverSpeed(); } } }
// Start is called before the first frame update void Start() { instructionPanel.SetActive(false); currentState = FSMStateMovement_Waypoint.MidLane; }