コード例 #1
0
    public bool IsCanReleaseMagic()
    {
        if (side == WarSceneController.WhichSide.Left && WarSceneController.state != WarSceneController.State.Running)
        {
            return(false);
        }

        if (!warCtrl.IsSwordFull(side))
        {
            return(false);
        }

        if (state == State.Escape)
        {
            return(false);
        }

        for (int i = 0; i < 4; i++)
        {
            if (gInfo.magic[i] != -1)
            {
                MagicDataInfo info = MagicManager.Instance.GetMagicDataInfo(gInfo.magic[i]);

                if (gInfo.manaCur >= info.MP)
                {
                    return(true);
                }
            }
            else
            {
                return(false);
            }
        }

        return(false);
    }