Beispiel #1
0
 public void RemoveGridObject()
 {
     if (gridObject != null)
     {
         //Grid has change and file is no longer consistant with grid
         if (gridCreator.currentGridFile != null)
         {
             gridCreator.currentGridFile = null;
         }
         gridObject.DestroyObject();
         if (gridObject.IsUnit())
         {
             gridCreator.RemoveCharacterSpawn((EditorUnit)gridObject);
         }
         else
         {
             gridCreator.RemoveLevelHazard((EditorLevelObject)gridObject);
         }
         gridObject = null;
     }
 }