using System.Collections; using System.Collections.Generic; using UnityEngine; using Opsive.UltimateCharacterController.Traits; public class damagePlayer : MonoBehaviour { public float dmg; [SerializeField] public GameObject damagedCharacter; // Start is called before the first frame update void Start() { } private void Update() { } private void OnCollisionEnter(Collision collider) { Debug.Log("Trigger!!!"); //var health = collision.transform.GetComponentInParent<CharacterHealth>(); //health.Damage(dmg); } //public void attackPlayer() //{ // var health = damagedCharacter.GetComponent<Health>(); // if (health != null) // { // health.Damage(dmg); // } //} }