Exemplo n.º 1
0
 public void BlockArea()
 {
     if (isRoot && Game.currentScene == Scene.Play)
     {
         Pathfinding.ChangeArea(GetModuleRect(), false);
     }
 }
Exemplo n.º 2
0
 void Stockify()
 {
     if (Game.currentScene == Scene.Play)
     {
         Pathfinding.ChangeArea(GetModuleRect(), true);
     }
     DestroyModule();
     PurchaseMenu.AddStock(this);
 }
Exemplo n.º 3
0
    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);
    }