Beispiel #1
0
 public void OpenMinerMenu(MinerStation minerStation)   //Activated by tapping on miner station
 {
     if (activeMenu != null)
     {
         return;
     }
     selectedMinerStation = minerStation;
     setActiveMenu(MinerController.MinerStation(selectedMinerStation), true);
 }
Beispiel #2
0
    void Start()
    {
        pathNodeGrid = new Grid <PathNode>((int)gridSize.x, (int)gridSize.y, 1f, Vector3.zero,
                                           (Grid <PathNode> g, int x, int y) => new PathNode(g, x, y));

        Vector2 siloPos = new Vector2(0, 0);

        GameObject siloGameObject = Instantiate(SiloPrefab);
        IStructure silo           = siloGameObject.GetComponent <Silo>();

        silo.InstantiateBlock(siloPos.x, siloPos.y);
        addStructureToGrid(silo);

        new JobController();       // its yellow but leave it, its fine

        Vector2    SawPos        = new Vector2(0, 2);
        GameObject sawGameObject = Instantiate(SawPrefab);
        Saw        saw           = sawGameObject.GetComponent <Saw>();

        saw.InstantiateBlock(SawPos.x, SawPos.y, 2, Processor.Tier.Bronze);
        addProcessorToGrid(saw);



        Vector2      minerStationPos        = new Vector2(2, 0);
        GameObject   minerStationGameObject = Instantiate(MinerStationPrefab);
        MinerStation minerStation           = minerStationGameObject.GetComponent <MinerStation>();

        minerStation.InstantiateBlock(minerStationPos.x, minerStationPos.y);
        addStructureToGrid(minerStation);



        /*
         * Vector2 secondminerStationPos = new Vector2(0, 4);
         * MinerStation secondminerStation = new MinerStation(secondminerStationPos.x, secondminerStationPos.y, this);
         * pathNodeGrid.GetGridObject(secondminerStationPos).SetStructure(secondminerStation);
         */

        //GenerateBay();
    }
Beispiel #3
0
 public MinerUpgradeController MinerStation(MinerStation minerStation)
 {
     this.minerstation = minerStation;
     return(this);
 }
 public void setMinerStation(MinerStation minerStation)
 {
     minerstation = minerStation;
     Debug.Log(this.minerstation);
 }