Beispiel #1
0
 public static BlockFactorySingleton GetInstance()
 {
     if (instance == null)
     {
         lock (lockObject)
         {
             if (instance == null)
             {
                 instance = new BlockFactorySingleton();
             }
         }
     }
     return(instance);
 }
Beispiel #2
0
 public TeleporterMapBuilder()
 {
     this.map         = new Map(xSize, ySize);
     this.map.mapName = "concrete";
     factory          = BlockFactorySingleton.GetInstance();
 }
Beispiel #3
0
 public DefaultMapBuilder()
 {
     this.map         = new Map(xSize, ySize);
     this.map.mapName = "default";
     factory          = BlockFactorySingleton.GetInstance();
 }