Ejemplo n.º 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();
        }
    }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 3
0
 public override void OnCreated(ILevelUp levelUp)
 {
     Debug.Log("[RF].LUEB LevelUpExtension Base Created.");
     base.OnCreated(levelUp);
 }
Ejemplo n.º 4
0
 public override void OnCreated(ILevelUp levelUp)
 {
 }
 //Thread: Main
 public override void OnCreated(ILevelUp levelUp)
 {
     ChirpLog.Debug("ILevelUp Created");
 }
Ejemplo n.º 6
0
 public override void OnCreated(ILevelUp levelUp)
 {
     base.OnCreated(levelUp);
 }
 //Thread: Main
 public override void OnCreated(ILevelUp levelUp)
 {
     ChirpLog.Debug("ILevelUp Created");
 }
Ejemplo n.º 8
0
 public override void OnCreated(ILevelUp levelUp)
 {
     #if DEBUG
     Logger.Info("LevelUpExtensionBase Created");
     #endif
 }