示例#1
0
 public Character(CharacterStats characterStats, CharacterTypes.Type type, BattleEngine battleEngine)
 {
     CharacterStats = characterStats;
     CharacterStats.CharacterParent = this;
     Status             = CharacterTypes.Status.Alive;
     Type               = type;
     BattleEngine       = battleEngine;
     CharacterUiControl = AvatarSpotsManager.GetSpot(Type);
     CharacterSetup();
     CharacterUiControl.AssignCharactersToUi(this);
 }
示例#2
0
 public static void FreeSpot(CharacterUi charAvater, CharacterTypes.Type type)
 {
     if (type == CharacterTypes.Type.Ally)
     {
         FreeSpotForList(charAvater, AvailableAllySpots);
     }
     else
     {
         FreeSpotForList(charAvater, AvailableAllySpots);
     }
 }
示例#3
0
        private static void FreeSpotForList(CharacterUi charUi, List <Tuple <CharacterUi, bool> > list)
        {
            int index = list.FindIndex(pair => pair.Item1.Equals(charUi));

            list[index] = new Tuple <CharacterUi, bool>(charUi, true);
        }