Exemple #1
0
 public GoblinWizard()
 {
     Book = SingletonMagicBook.Instance();
 }
Exemple #2
0
 public ElfWizard()
 {
     Book = SingletonMagicBook.Instance();
 }
Exemple #3
0
 // we need to protect this method somehow
 public static SingletonMagicBook Instance()
 {
     return(uniqueInstance ?? (uniqueInstance = new SingletonMagicBook()));
 }