Ejemplo n.º 1
0
 void AddInitialCharacters()
 {
     for (int i = 0; i < CharacterSpawner.instance.characterDatas.Count; i++)
     {
         CharacterCreationPanel p = Instantiate(characterCreationPrefab, characterCreationParent).GetComponent <CharacterCreationPanel>();
         p.SetContent(CharacterSpawner.instance.characterDatas[i]);
     }
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (instance == null)
     {
         //...set this one to be it...
         instance = this;
     }
     //...otherwise...
     else if (instance != this)
     {
         //...destroy this one because it is a duplicate.
         Destroy(gameObject);
     }
 }
Ejemplo n.º 3
0
    public void NewCharacter()
    {
        CharacterCreationPanel p = Instantiate(characterCreationPrefab, characterCreationParent).GetComponent <CharacterCreationPanel>();

        p.SetContent(CharacterSpawner.instance.NewCharacter());
    }