private void ValidateUpgrade(ILevelUp levelUpSkill, int cost) { if (LobbyManager.Instance.CurrentPlayer.Money < cost) { onMoneyNotEnough.Invoke(); } else { LobbyManager.Instance.CurrentPlayer.Money -= cost; levelUpSkill.LevelUP(); onUpgradeCompleted.Invoke(); } }
public void ApplyLevelUp(ILevelUp levelUp) { this.ExperiencePoints += levelUp.ExperiencePoints; if (this.ExperiencePoints < 0) { this.ExperiencePoints = 0; } this.Level += levelUp.Level; foreach (var statDie in levelUp.StatDice) { switch (statDie.Key) { case DiceSlot.HitPoints: this.MaximumHitPoints.Value += statDie.Value.Roll(); break; case DiceSlot.MagicPoints: this.MaximumMagicPoints.Value += statDie.Value.Roll(); break; case DiceSlot.Strength: this.Strength.Value += statDie.Value.Roll(); break; case DiceSlot.Defense: this.Defense.Value += statDie.Value.Roll(); break; case DiceSlot.Speed: this.Speed.Value += statDie.Value.Roll(); break; case DiceSlot.Intelligence: this.Intelligence.Value += statDie.Value.Roll(); break; } } }
public override void OnCreated(ILevelUp levelUp) { Debug.Log("[RF].LUEB LevelUpExtension Base Created."); base.OnCreated(levelUp); }
public override void OnCreated(ILevelUp levelUp) { }
//Thread: Main public override void OnCreated(ILevelUp levelUp) { ChirpLog.Debug("ILevelUp Created"); }
public override void OnCreated(ILevelUp levelUp) { base.OnCreated(levelUp); }
public override void OnCreated(ILevelUp levelUp) { #if DEBUG Logger.Info("LevelUpExtensionBase Created"); #endif }