예제 #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");
            }
        }
예제 #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");
            }
        }