protected virtual void Reset() { ParticleSystem[] p = GetComponentsInChildren <ParticleSystem>(true); Particles = p; muzzle = transform.Find("Muzzle").transform; turrets = transform.GetComponentInParent <TurretsContorl>(); }
private void Reset() { model = transform.GetChild(0).transform; ParticleSystem[] p = GetComponentsInChildren <ParticleSystem>(true); Particles = p; muzzle = transform.Find("Muzzle").transform; turrets = transform.GetComponentInParent <TurretsContorl>(); }
protected virtual void Start() { Transform root = GetRoot(transform); if (root.tag == "Player") { controllerIsPlayer = true; } if (!turrets) { turrets = transform.GetComponentInParent <TurretsContorl>(); } if (!muzzle) { muzzle = transform.Find("Muzzle").transform; } }
protected override void Start() { base.Start(); t = GetComponentInParent <TurretsContorl>(); }