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