Пример #1
0
    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();
        }
    }
Пример #2
0
        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;
                }
            }
        }
Пример #3
0
 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");
 }
Пример #6
0
 public override void OnCreated(ILevelUp levelUp)
 {
     base.OnCreated(levelUp);
 }
 //Thread: Main
 public override void OnCreated(ILevelUp levelUp)
 {
     ChirpLog.Debug("ILevelUp Created");
 }
Пример #8
0
 public override void OnCreated(ILevelUp levelUp)
 {
     #if DEBUG
     Logger.Info("LevelUpExtensionBase Created");
     #endif
 }