Exemple #1
0
 private void OnDestroy()
 {
     if (Application.isPlaying)
     {
         if (tile)
         {
             tile.Exit(this);
         }
     }
 }
Exemple #2
0
 private void OnDestroy()
 {
     if (Application.isPlaying)
     {
         if (City)
         {
             City.Remove(this);
         }
         if (tile)
         {
             tile.Exit(this);
         }
         if (Config.Temporary != null && Config.Temporary.selectedUnit == this)
         {
             Config.Temporary.selectedUnit = null;
             CanvasLayerInGame.RefreshSelectedTile();
         }
     }
 }