Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class Target : MonoBehaviour {
  5.  
  6. float multiplier;
  7. public GameObject[] Thrusters;
  8. GameObject selectedThruster;
  9.  
  10. void Start(){
  11. StartCoroutine (ThrusterActivator ());
  12. }
  13.  
  14. void OnCollisionEnter(Collision col){
  15. /*if (col.gameObject.tag = "bullet") {
  16. multiplier =
  17. }*/
  18. }
  19.  
  20. IEnumerator ThrusterActivator(){
  21. yield return new WaitForSeconds (Random.Range(2,4));
  22. selectedThruster = Thrusters [Random.Range (0, 7)];
  23. selectedThruster.SetActive (true);
  24. yield return new WaitForSeconds (2);
  25. selectedThruster.SetActive (false);
  26. StartCoroutine(ThrusterActivator());
  27. }
  28.  
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement