// Start is called before the first frame update void Start() { thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>(); gameObject.tag = "Bullet"; rb = this.GetComponent <Rigidbody>(); switch (direction) { case 0: movement = new Vector3(1f, 0f, 0f); break; case 1: movement = new Vector3(-1f, 0f, 0f); break; case 2: movement = new Vector3(0, 0f, 1f); break; case 3: movement = new Vector3(0f, 0f, -1f); break; } StartCoroutine(destroySelf()); }
// Start is called before the first frame update void Start() { build = FindObjectOfType <BuildSettings>(); platform = FindObjectOfType <PlatformingManager>(); gc = FindObjectOfType <GlobalController>(); col = GetComponent <BoxCollider2D>(); }
private void Awake() { bG = FindObjectOfType <Background>(); build = FindObjectOfType <BuildSettings>(); platform = FindObjectOfType <PlatformingManager>(); tO = FindObjectOfType <TotalObjects>(); pointer = FindObjectOfType <Pointer>(); needsUIUpdate = true; }
// Start is called before the first frame update void Start() { thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>(); interval = Random.Range(3.0f, 20.0f); switch (direction) { case 0: rotation = Quaternion.Euler(0, 0, 90); break; case 1: rotation = Quaternion.Euler(0, 0, 90); break; case 2: rotation = Quaternion.Euler(90, 0, 0); break; case 3: rotation = Quaternion.Euler(90, 0, 0); break; } StartCoroutine(randomFire(interval)); }
private void Awake() { platform = FindObjectOfType <PlatformingManager>(); }
// Start is called before the first frame update void Start() { thePlatformingManager = GameObject.FindObjectOfType <PlatformingManager>(); rb = this.GetComponent <Rigidbody>(); }