示例#1
0
    private List <CharacterProvider> CreatePlayersCharactersView(List <ICharacter> playersCharacters, CharacterProvider _prefab)
    {
        List <CharacterProvider> listOfViews = new List <CharacterProvider>();

        foreach (ICharacter character in playersCharacters)
        {
            CharacterProvider newCharacter = Instantiate(_prefab);
            newCharacter.Initialize(character);

            listOfViews.Add(newCharacter);
        }

        return(listOfViews);
    }