Skills.GetSkill C# (CSharp) Method

GetSkill() public method

public GetSkill ( int SkillNo ) : int
SkillNo int
return int
    public int GetSkill(int SkillNo)
    {
        //Gets the value for the requested skill

        switch (SkillNo)
        {
        case SkillAttack : return Attack;
        case SkillDefense : return Defense;
        case SkillUnarmed :return Unarmed;
        case SkillSword : return Sword;
        case SkillAxe :return Axe;
        case SkillMace : return Mace;
        case SkillMissile :return Missile;
        case SkillMana :return ManaSkill;
        case SkillLore :return Lore;
        case SkillCasting :return Casting;
        case SkillTraps :return Traps;
        case SkillSearch :return Search;
        case SkillTrack :return Track;
        case SkillSneak :return Sneak;
        case SkillRepair :return Repair;
        case SkillCharm :return Charm;
        case SkillPicklock :return PickLock;
        case SkillAcrobat :return Acrobat;
        case SkillAppraise :return Appraise;
        case SkillSwimming : return Swimming;
        default: return -1;
        }
    }

Usage Example

Exemplo n.º 1
0
 public void onLanding(float fallSpeed)
 {
     if (isSwimming == false)
     {
         float fallspeedAdjusted = fallSpeed - ((float)PlayerSkills.GetSkill(Skills.SkillAcrobat) * 0.13f);
         //Do stuff with acrobat here. In the mean time a flat skill check.
         if (fallspeedAdjusted >= 3.5f)
         {
             //Debug.Log("Fallspeed = " + fallSpeed + " adjusted down to " + fallspeedAdjusted) ;
             ApplyDamage(Random.Range(1, 5));                //TODO:As a function of the acrobat skill versus fall.
         }
         aud.clip = GameWorldController.instance.getMus().SoundEffects[0];
         aud.Play();
     }
 }
All Usage Examples Of Skills::GetSkill