private void placeWall() { Orbiter wallScript = wall.GetComponent <Orbiter>(); if (isClear() && resources >= wallScript.cost) { resources -= wallScript.cost; GameObject ring = ringMan.getRing(transform.position); GameObject newWall = Instantiate(wall, ring.transform); Orbiter newWallScript = newWall.GetComponent <Orbiter>(); newWallScript.setTheta(angle); newWallScript.setRho(radius); } }
private void placeTurret() { Orbiter turretScript = turret.GetComponent <Orbiter>(); if (isClear() && resources >= turretScript.cost) { resources -= turretScript.cost; GameObject ring = ringMan.getRing(transform.position); GameObject newTurret = Instantiate(turret, ring.transform); Orbiter newTurretScript = newTurret.GetComponent <Orbiter>(); newTurretScript.setTheta(angle); newTurretScript.setRho(radius); newTurretScript.ring = ring; } }