public void Reset(bool isResetSubscription = false) { if (isResetSubscription) { } //BridgeEngineUnity.main.onControllerButtonEvent.AddListener(OnControllerButton); SpawnPlayerRandomly(); checkPointObject.transform.position = CustomRaycasting.RayCastToScene(transform.position); }
public void OnCheckpointReached(int index) { Debug.Log(string.Format("CheckpointManager - OnCheckpointReached: {0}", index)); // checkPointObject.transform.position = CustomRaycasting.RayCastToScene(transform.position); Game.GameManager.Instance.Game.Player .GetComponent <BridgeEngine.Input.CarControllerInput>() .SetAnimationBool("isPlayCheckpointAnimation", true); StartCoroutine(MakeNewCheckpoint(CustomRaycasting.RayCastToScene(transform.position))); Debug.Log(string.Format("New checkpoint spawned at {0}", checkPointObject.transform.position.ToString())); }
void SetNewTarget() { m_TargetPosition = CustomRaycasting.RayCastToScene(transform.position + Vector3.up * 2); }
private void SpawnPlayerRandomly() { Game.GameManager.Instance.Game.Player.transform.position = CustomRaycasting.RayCastToScene(transform.position) + Vector3.up * .1f; }