Itterate() 공개 메소드

public Itterate ( float itterateTime ) : void
itterateTime float
리턴 void
예제 #1
0
    public void Update()
    {
        if (weaponTrail == null)
        {
            return;
        }

        t = Mathf.Clamp(Time.deltaTime, 0, 0.066f);

        if (t > 0)
        {
            while (tempT < t)
            {
                tempT += animationIncrement;

                if (weaponTrail.time > 0)
                {
                    weaponTrail.Itterate(Time.time - t + tempT);
                }
                else
                {
                    weaponTrail.ClearTrail();
                }
            }

            tempT -= t;

            if (weaponTrail.time > 0)
            {
                weaponTrail.UpdateTrail(Time.time, t);
            }
        }
    }
예제 #2
0
    void LateUpdate()
    {
        t = Mathf.Clamp(Time.deltaTime, 0, 0.066f);

        if (t > 0)
        {
            while (tempT < t)
            {
                tempT += animationIncrement;

                if (myTrail.time > 0)
                {
                    myTrail.Itterate(Time.time - t + tempT);
                }
                else
                {
                    myTrail.ClearTrail();
                }
            }

            tempT -= t;

            if (myTrail.time > 0)
            {
                myTrail.UpdateTrail(Time.time, t);
            }
        }
    }
예제 #3
0
 // Update is called once per frame
 void Update()
 {
     if (FrontBlade.active)
     {
         frontTrail.Itterate(Time.time + IterateTime);
         frontTrail.UpdateTrail(Time.time, UpdateTrailLag);
     }
     if (BackBlade.active)
     {
         backTrail.Itterate(Time.time + IterateTime);
         backTrail.UpdateTrail(Time.time, UpdateTrailLag);
     }
 }
예제 #4
0
    void LateUpdate()
    {
        //wt.ClearTrail();

        if (null != wt)
        {
            float mAnimTime = Mathf.Clamp(Time.deltaTime * 1, 0, 0.066f);
            wt.Itterate(0f);
            if (wt.time > 0)
            {
                wt.UpdateTrail(Time.time, mAnimTime);
            }
        }
    }
    void LateUpdate()
    {
        if (characterAnim.doBaseSkill1)
        {
            currentWeaponTrail = baseSkill_Trail1;
        }
        else if (characterAnim.doBaseSkill2)
        {
            currentWeaponTrail = baseSkill_Trail2;
        }
        else if (characterAnim.doSkill1)
        {
            currentWeaponTrail = Skill_Trail1;
        }
        else if (characterAnim.doSkill2)
        {
            currentWeaponTrail = Skill_Trail2;
        }
        else if (characterAnim.doSkill3)
        {
            currentWeaponTrail = Skill_Trail3;
        }

        t = Mathf.Clamp(Time.deltaTime, 0, 0.066f);

        if (t > 0)
        {
            while (tempT < t)
            {
                tempT += animationIncrement;

                if (currentWeaponTrail.time > 0)
                {
                    currentWeaponTrail.Itterate(Time.time - t + tempT);
                }
                else
                {
                    currentWeaponTrail.ClearTrail();
                }
            }

            tempT -= t;

            if (currentWeaponTrail.time > 0)
            {
                currentWeaponTrail.UpdateTrail(Time.time, t);
            }
        }
    }
예제 #6
0
    void LateUpdate()
    {
        if (playerstate.ani_stat == playerStateLinster.enum_ani_state.Trotting || playerstate.ani_stat == playerStateLinster.enum_ani_state.Walking)
        {
            myTrail.UpdateTrail(0, 0);

            //	myTrail.ClearTrail();
            //	if(myTrail.time<0) myTrail.ClearTrail();
            return;
        }

        t = Mathf.Clamp(Time.deltaTime, 0, 0.066f);

        if (t > 0)
        {
            while (tempT < t)
            {
                tempT += animationIncrement;

                if (myTrail.time > 0)
                {
                    myTrail.Itterate(Time.time - t + tempT);
                }
                else
                {
                    myTrail.ClearTrail();
                }
            }

            tempT -= t;

            if (myTrail.time > 0)
            {
                myTrail.UpdateTrail(Time.time, t);
            }
        }
    }
예제 #7
0
 void FixedUpdate()
 {
     currentBaseState = anim.GetCurrentAnimatorStateInfo(0);
     //只有在攻击状态中才展示刀光拖尾特效
     if (currentBaseState.fullPathHash == atk1State ||
         currentBaseState.fullPathHash == atk2State ||
         currentBaseState.fullPathHash == atk3State)
     {
         trail.Itterate(Time.time);
         trail.UpdateTrail(Time.time, Time.fixedDeltaTime);
     }
     else
     {
         trail.Itterate(0);
         trail.UpdateTrail(Time.time, Time.fixedDeltaTime);
     }
     //可攻击控制
     if (GetFire(0) && CanAttack())
     {
         if (isFirstAttack)
         {
             anim.SetBool("Attack1", true);
             isFirstAttack = false;
         }
     }
     //一段攻击内容和切换条件
     if (currentBaseState.fullPathHash == atk1State)
     {
         if (currentBaseState.normalizedTime >= 0.4f)
         {
             if (GetFire(0))
             {
                 anim.SetBool("Attack2", true);
                 anim.SetBool("Attack1", false);
             }
         }
         if (currentBaseState.normalizedTime >= 0.9f)
         {
             ResetState();
         }
     }
     //二段攻击内容和切换条件
     if (currentBaseState.fullPathHash == atk2State)
     {
         if (currentBaseState.normalizedTime >= 0.5f)
         {
             if (GetFire(0))
             {
                 anim.SetBool("Attack3", true);
                 anim.SetBool("Attack2", false);
             }
         }
         if (currentBaseState.normalizedTime >= 0.9f)
         {
             ResetState();
         }
     }
     //三段攻击内容和切换条件
     if (currentBaseState.fullPathHash == atk3State)
     {
         if (currentBaseState.normalizedTime >= 0.9f)
         {
             ResetState();
         }
     }
 }