コード例 #1
0
 public void levelUp()
 {
     if (CurrentLevel < CharacterType.MAX_CHAR_LVL - 1)
     {
         CurrentLevel++;
         Stats = CharacterType.statsCopy();
     }
 }
コード例 #2
0
 public void reset()
 {
     Stats = CharacterType.statsCopy();
     statusEffects.Clear();
     IsDead        = false;
     CurrentTarget = null;
     ToMoveTo      = null;
     hideChooseSpellUI();
 }
コード例 #3
0
        public Character(Grid grid,
                         Tile currentTile,
                         Teams team,
                         CharacterType[] characterType,
                         GameManager gameManager,
                         GameNetworkManager gameNetworkManager)
        {
            this.grid = grid;
            currentTile.CurrentCharacter = this;
            this.team               = team;
            SpellReady              = false;
            this.characterType      = characterType;
            this.gameManager        = gameManager;
            this.gameNetworkManager = gameNetworkManager;
            ChooseSpell             = new ChooseSpell(this, ActiveSpells, gameNetworkManager);
            InactiveSpell           = new InactiveSpell(this, InactiveSpells, gameNetworkManager);

            Stats          = CharacterType.statsCopy();
            ActiveSpells   = new List <Spells[]>();
            InactiveSpells = new List <Spells[]>();
            LearnedSpells  = new List <Spells[]>();
            SpellLevel     = new Dictionary <Spells[], int>();
            brush          = (team == Teams.Blue) ? Brushes.BlueViolet : Brushes.Red;
            isBlue         = (team == Teams.Blue);
            statusEffects  = new List <StatusEffect>();

            IsDead = false;

            statsMultiplier = new Dictionary <StatusType, float>();
            statsAdder      = new Dictionary <StatusType, int>();
            foreach (StatusType statusType in Enum.GetValues(typeof(StatusType)))
            {
                statsAdder.Add(statusType, 0);
                statsMultiplier.Add(statusType, 1f);
            }

            hpBar = new StatBar(this,
                                team == Teams.Blue ? Brushes.GreenYellow : Brushes.OrangeRed, 0);
            charageBar = new StatBar(this, Brushes.Blue, 1);
        }