/* * Adds a statpoint if there any unallocated points * @Param StatType - The stat type the player wants to increase */ public void AddStat(StatType stat) { switch (stat) { case StatType.sta: if (unallocatedPts > 0) { sta.AddStat(); --unallocatedPts; } break; case StatType.str: if (unallocatedPts > 0) { str.AddStat(); --unallocatedPts; } break; case StatType.dex: if (unallocatedPts > 0) { dex.AddStat(); --unallocatedPts; } break; case StatType.def: if (unallocatedPts > 0) { def.AddStat(); --unallocatedPts; } break; } }