示例#1
0
 public void Load(PlayerBehaviour runner)
 {
     if (runner.transform.Find(vehicleObject.name + "(Clone)"))
     {
         Debug.LogError("Trying to load again a vehicle! " + vehicleObject.name + "(Clone)");
     }
     else
     {
         Instantiate(vehicleObject, runner.transform);
     }
 }
示例#2
0
 public IEnumerator TurnOn(PlayerBehaviour runner)
 {
     Debug.Log("Turn on rocket");
     if (runner.transform.Find(vehicleObject.name + "(Clone)").TryGetComponent(out Animator animator))
     {
         animator.SetBool("IsRunning", true);
     }
     else
     {
         Debug.LogError("No vehicle instance!");
     }
     yield return(null);
 }