예제 #1
0
        public void Dispose()
        {
            if (MyTeam != null)
            {
                MyTeam.Clear();
            }

            if (MyPokemons != null)
            {
                MyPokemons.Clear();
            }

            if (OtherDefenders != null)
            {
                OtherDefenders.Clear();
            }
        }
예제 #2
0
        public void AddPokemon(ISession session, PokemonData pokemon, bool isMine = true)
        {
            if (isMine && MyPokemons.Any(a => a.Data.Id == pokemon.Id))
            {
                return;
            }

            if (!isMine && OtherDefenders.Any(a => a.Data.Id == pokemon.Id))
            {
                return;
            }

            if (isMine)
            {
                MyPokemons.Add(new MyPokemonStat(session, pokemon));
            }
            else
            {
                OtherDefenders.Add(new AnyPokemonStat(session, pokemon));
            }
        }