예제 #1
0
 public void Destroye()
 {
     if (DisplayBlock)
     {
         //BuildingBlock block = Entity.GetComponent<BuildingBlock>();
         Entity.Kill();
     }
     if (Stair != null)
     {
         Stair.Destroye();
     }
     if (FloorFrame != null)
     {
         FloorFrame.Destroye();
     }
     if (LadderHatch != null)
     {
         LadderHatch.Destroye();
     }
     if (Roof != null)
     {
         Roof.Destroye();
     }
     foreach (Block wall in Walls)
     {
         wall.Destroye();
     }
 }
예제 #2
0
 public void SpawnEntitys()
 {
     if (DisplayBlock)
     {
         BuildingBlock block = Entity.GetComponent <BuildingBlock>();
         if (block != null)
         {
         }
         Entity.Spawn();
         if (block != null)
         {
             block.SetGrade(BuildingGrade.Enum.TopTier);
             block.SetHealthToMax();
             block.cachedStability = 100;
         }
     }
     if (Stair != null)
     {
         Stair.SpawnEntitys();
     }
     if (FloorFrame != null)
     {
         FloorFrame.SpawnEntitys();
     }
     if (LadderHatch != null)
     {
         LadderHatch.SpawnEntitys();
     }
     if (Roof != null)
     {
         Roof.SpawnEntitys();
     }
     foreach (Block wall in Walls)
     {
         wall.SpawnEntitys();
     }
 }