Beispiel #1
0
        // Start is called before the first frame update
        private void OnTriggerEnter(Collider other)
        {
            playerStats PlayerStats = other.GetComponent <playerStats>();

            if (PlayerStats != null)
            {
                PlayerStats.TakeHealth(health);
                Debug.Log("Gain 25");
            }
        }
Beispiel #2
0
        // Start is called before the first frame update
        private void OnTriggerEnter(Collider other)
        {
            playerStats PlayerStats = other.GetComponent <playerStats>();

            if (PlayerStats != null)
            {
                PlayerStats.TakeDamage(damage);
                Debug.Log("Lose 25");
            }
        }