예제 #1
0
    public void Reset(bool isResetSubscription = false)
    {
        if (isResetSubscription)
        {
        }
        //BridgeEngineUnity.main.onControllerButtonEvent.AddListener(OnControllerButton);

        SpawnPlayerRandomly();
        checkPointObject.transform.position = CustomRaycasting.RayCastToScene(transform.position);
    }
예제 #2
0
    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()));
    }
예제 #3
0
 void SetNewTarget()
 {
     m_TargetPosition = CustomRaycasting.RayCastToScene(transform.position + Vector3.up * 2);
 }
예제 #4
0
 private void SpawnPlayerRandomly()
 {
     Game.GameManager.Instance.Game.Player.transform.position = CustomRaycasting.RayCastToScene(transform.position) + Vector3.up * .1f;
 }