Ejemplo n.º 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");
            }
        }
Ejemplo n.º 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");
            }
        }