示例#1
0
 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>();
 }
示例#2
0
        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);
示例#4
0
 void Awake()
 {
     animator = GetComponent <Animator>();
     animator.SetBool("Acting", false);
     playerStat = gameObject.GetComponent <Coven.PlayerStat>();
 }