// Start is called before the first frame update void Start() { audioSource = GetComponent <AudioSource>(); shur = FindObjectOfType <shuriken>(); dest = FindObjectOfType <destroyer>(); }
void Shoot() { GameObject bulletGO = (GameObject)Instantiate(bullet_prefab, spawn_point.position, spawn_point.rotation); shuriken bullet_script = bulletGO.GetComponent <shuriken>(); if (bullet_script != null) { bullet_script.Chase(target); } }