コード例 #1
0
    public void ExcecutePower(Powers power)
    {
        float reducedEnergyLvl = (((int)power - (int)playerInfo.movSet * 4) + 1) * 0.25f;

        if (reducedEnergyLvl <= playerInfo.energy)
        {
            playerInfo.energy -= reducedEnergyLvl;
            string name = System.Enum.GetName(power.GetType(), power);

            Debug.Log(name);
            Invoke(name, 0);
        }
    }