예제 #1
0
    public void summonUpdate()
    {
        switch (state)
        {
        case State.IDLE:
            if (IsRightGridPress)
            {
                IsRightGridPress = false;
                // Debug.Log(IsRightGridPress);
            }
            //toAimming(summmm);
            break;

        case State.AIMMING:
            if (IsRightGridPress && SummonObj)
            {
                IsRightGridPress = false;
                //print("do");
                if (MousePosition())
                {
                    state = State.SUMMON;
                    summon(SummonObj, mouseTarget);
                }
                else
                {
                    state = State.IDLE;
                }
            }
            break;

        case State.SUMMON:
            break;

        default:
            break;
        }
        energySystem.energyUpdate();
    }