private void OnTriggerEnter(Collider other) { playerShip playerShip = other.gameObject.GetComponent <playerShip>(); if (playerShip != null) { playerShip.Kill(); } }
void Awake() { if (ship == null) { ship = this; //set ship singleton } else { Debug.LogError("Hero.Awake() - Attempted to assign second Hero.Ship!"); } //fireDelegate += TempFire; }
// Start is called before the first frame update void Start() { health_score = GetComponent <TextMeshProUGUI>(); playerHealth = FindObjectOfType <playerShip>(); }