Advertisement
dronkowitz

RocketAccel.cs

Oct 28th, 2021
752
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.14 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class RocketAccel : MonoBehaviour
  6. {
  7.     public GameObject speedCharacterAcceleration, flyCharacterAcceleration, powerCharacterAcceleration;
  8.     public AudioClip rocketAccelSound;
  9.     public bool speedRollAcceleration;
  10.     public float teamAcceleration = 20.0f;
  11.     // Start is called before the first frame update
  12.     void Start()
  13.     {
  14.  
  15.     }
  16.  
  17.     // Update is called once per frame
  18.     void Update()
  19.     {
  20.  
  21.     }
  22.     public void SpinTeamAcceleration()
  23.     {
  24.         GetComponent<AudioSource>().Play();
  25.     }
  26.     public void OnTriggerEnter(Collider other)
  27.     {
  28.         if (other.CompareTag("Player")&&Input.GetKey(KeyCode.B))
  29.         {
  30.             GetComponent<Rigidbody>().CompareTag("Player");
  31.         }
  32.  
  33.        
  34.     }
  35.  
  36.     public IEnumerator SpeedRocketAcceleration(GameObject speedCharacter)
  37.     {
  38.         speedCharacter.GetComponent<UltimatePlayerMovement>().leftFollower.SetActive(false);
  39.         speedCharacter.GetComponent<UltimatePlayerMovement>().rightFollower.SetActive(false);
  40.        
  41.  
  42.  
  43.         yield return null;
  44.     }
  45. }
  46.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement