Пример #1
0
    private void OnTriggerEnter(Collider other)
    {
        playerShip playerShip = other.gameObject.GetComponent <playerShip>();

        if (playerShip != null)
        {
            playerShip.Kill();
        }
    }
Пример #2
0
 void Awake()
 {
     if (ship == null)
     {
         ship = this;   //set ship singleton
     }
     else
     {
         Debug.LogError("Hero.Awake() - Attempted to assign second Hero.Ship!");
     }
     //fireDelegate += TempFire;
 }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     health_score = GetComponent <TextMeshProUGUI>();
     playerHealth = FindObjectOfType <playerShip>();
 }