public void BlockArea() { if (isRoot && Game.currentScene == Scene.Play) { Pathfinding.ChangeArea(GetModuleRect(), false); } }
void Stockify() { if (Game.currentScene == Scene.Play) { Pathfinding.ChangeArea(GetModuleRect(), true); } DestroyModule(); PurchaseMenu.AddStock(this); }
public void DestroyModule(bool removeFromList = true) { Destroy(gameObject); if (removeFromList) { Game.currentModules.Remove(this); } if (Game.currentScene == Scene.Play) { Pathfinding.ChangeArea(GetModuleRect(), true); Game.ChangeWalls(GetRelativeModuleRect(), Game.WallType.Player, true); } rootModule.modules.Remove(this); }