예제 #1
0
 public void useSkill(string name, SkillSetting setting, skillFunction interruptCallBack, bool canMove = false, bool enforce = false)
 {
     useSkill(name, setting, canMove, enforce);
     this.interruptCallBack = interruptCallBack;
 }
예제 #2
0
 /// <summary>
 /// Add skills. Use useSkill function to release skill
 /// </summary>
 /// <param name="name">skill name</param>
 /// <param name="f">skill IEnumerator function</param>
 /// <param name="cd"></param>
 public void addSkill(string name, skillFunction f, float initCD = 0)
 {
     skills.Add(name, f);
     skillCooler.Add(name, initCD);
 }
예제 #3
0
    public virtual void updateStatus()
    {
        movementFreezenTime = Mathf.Max(movementFreezenTime, freezenTime);
        if (movementFreezenTime > 0)
        {
            movementFreezenTime -= Time.deltaTime;
        }

        if (freezenTime > 0)
        {
            freezenTime -= Time.deltaTime;
            if (anim)
                anim.SetBool("hurt", true);
        }
        else
        {
            if (anim)
                anim.SetBool("hurt", false);
        }

        if (antiStaggerTime > 0)
        {
            antiStaggerTime -= Time.deltaTime;
        }

        if (actingTime > 0)
        {
            actingTime -= Time.deltaTime;
        }
        else
        {
            currentSkill = null;
            interruptCallBack = null;
        }

        if (anim)
            anim.SetFloat("moveSpeed", Mathf.Abs(body.velocity.x));
    }