public void SetSelf() { inputDriver = new InputDriver(rb, drone, this); isSelf = true; // bammoProgressBar = GameObject.Find("ammoProgressBar") as BProgressBar; // bammoProgressBar = GameObject.FindObjectOfType<("ammoProgressBar") as >BProgressBar; Debug.Log("inputDriver"); }
override protected void Destruct() { if (audioSourceDestroy) { audioSourceDestroy.Play(); } if (explosion) { explosion.Play(); } inputDriver = null; // sphereCollider.enabled = false; /* * if (audioSourceDestroy || explosion) * StartCoroutine(DestroyThis(2)); * else * Destroy(gameObject); */ }