void Awake() { if (!photonView.IsMine) { animator.gameObject.SetActive(false); camInteract.gameObject.SetActive(false); enabled = false; } animator = GetComponent <Animator>(); animator.SetBool("Acting", false); playerStat = gameObject.GetComponent <Coven.PlayerStat>(); }
void OnTriggerEnter(Collider collider) { if (isHiting && collider.gameObject.tag == "mob") { PlayerStat playerStat = player.GetComponent <PlayerStat>(); switch (GetScript(collider.gameObject)) { case "Hob": Hob.TakeDamage(playerStat); break; case "Dragon": Dragon.TakeDamage(playerStat); break; case "Skeleton": Skeleton.TakeDamage(playerStat); break; default: break; } isHiting = false; } }
public abstract void TakeDamage(PlayerStat player);
void Awake() { animator = GetComponent <Animator>(); animator.SetBool("Acting", false); playerStat = gameObject.GetComponent <Coven.PlayerStat>(); }