示例#1
0
 void IdleState2()
 {
     timer -= Time.deltaTime;
     if (timer <= 0)
     {
         mSwordTrapState = SwordTrapState.RiseState;
         timer           = 1.5f;
     }
 }
示例#2
0
    void LowerState()
    {
        Vector3 curr = transform.position;

        curr.y -= riseSpeed * Time.deltaTime;
        if (curr.y <= -17f)
        {
            mSwordTrapState = SwordTrapState.IdleState2;
        }
        else
        {
            transform.position = curr;
        }
    }
示例#3
0
    void RiseState()
    {
        Vector3 curr = transform.position;

        curr.y += riseSpeed * Time.deltaTime;
        if (curr.y >= -14.2)
        {
            mSwordTrapState = SwordTrapState.IdleState;
        }
        else
        {
            transform.position = curr;
        }
    }