private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         if (Name != null)
         {
             MemoryPoolManager.Instance.MemoryDelete();
             PlayerIO.SaveData();
             LoadingSceneManager.LoadingScene(Name);
         }
     }
 }
    public override bool Execute(GameObject target)
    {
        Skill skill = target.GetComponent <Skill>();

        if (skill != null)
        {
            //마나가 필요없는 경우
            if (_Index == 5)
            {
                skill.Avoid();
                return(true);
            }

            if (base.Execute(target))
            {
                if (_Index == 0)
                {
                    skill.PlayWhirlwind();
                }
                else if (_Index == 1)
                {
                    skill.StopWhirlwind();
                }
                else if (_Index == 2)
                {
                    skill.Bash();
                }
                else if (_Index == 3)
                {
                    skill.Dash();
                }
                else if (_Index == 4)
                {
                    skill.ThrowAxe();
                }
                else if (_Index == 6)
                {
                    skill.Buff();
                }


                PlayerIO.SaveData();

                return(true);
            }
        }
        return(false);
    }
Esempio n. 3
0
    public void TakeDamage(float enemyAttack)
    {
        StartCoroutine(ReDoColor());

        ChangeColor(GetComponentsInChildren <SkinnedMeshRenderer>(), new Color(0.3455882f, 0, 0));

        if (CHState == CH_STATE.Idle || m_Anim.GetCurrentAnimatorStateInfo(0).IsName("InWeapon"))
        {
            SetState(CH_STATE.Wait);
        }

        Health.TakeDamage(enemyAttack);

        PlayerIO.SaveData();

        if (Health.IsDeath())
        {
            SetState(CH_STATE.Dead);
        }
    }