Exemple #1
0
    public void SkillInput()
    {
        if (playerAnimator.playerCam)
        {
            playerMotor.OnCharacterAlignWithCamera();
        }
        //play skill animation and checkAttack
        playerAnimator.SkillInput(skillType);

        //if throwWeapon
        if (skillType == 6)
        {
            roomMenu.localPlayer.properties.ThrowingWeaponNum--;
            playerInfo.CheckThrowWeaponNum();
        }
        //if superSkill
        else if (skillType == 5)
        {
            playerInfo.GetVital((int)VitalName.Energy).BaseValue = 0;
        }

        //record time after using the skill for calculating CDtime
        if (skillType != 5 && skillType > 0)
        {
            playerInfo.GetVital((int)VitalName.Mana).DamageValue += playerInfo.GetMagicSkill(skillType - 1).Mana;
            playerInfo._skillCDTimer[skillType - 1] = Time.time;
        }
    }