Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class BaseStat {
- private int _baseValue;
- private int _buffValue;
- private int _nextLevel;
- private float _nextLevelModifier;
- public BaseStat()
- {
- _baseValue = 0;
- _buffValue = 0;
- _nextLevel = 100;
- _nextLevelModifier = 1.1f;
- }
- #region Public Accessor Method
- public int BaseValue
- {
- get { return _baseValue; }
- set { _baseValue = value; }
- }
- public int BuffValue
- {
- get { return _buffValue; }
- set { _buffValue = value; }
- }
- public int NextLevel
- {
- get { return _nextLevel; }
- set { _nextLevel = value; }
- }
- public float NextLevelModifier
- {
- get { return _nextLevelModifier; }
- set { _nextLevelModifier = value; }
- }
- #endregion
- public void LevelUp()
- {
- _nextLevel = (int)(_nextLevel * _nextLevelModifier);
- _baseValue++;
- }
- public int BuffedValue
- {
- get { return _baseValue + _buffValue; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement