void placeDecoUpdate(EnvironmentTile tile) { if (tile != null) { //Shpw the shop at the mouse position in the centre of the tile spawnedDeco.transform.position = new Vector3(mRaycastHits[0].transform.position.x + 5, mRaycastHits[0].transform.position.y + 3, mRaycastHits[0].transform.position.z + 5); } //Rotate the shop using the scroll click or space if (Input.GetMouseButtonDown(2) || Input.GetKeyDown(KeyCode.Space)) { spawnedDeco.transform.Rotate(Vector3.up, 90.0f); } else if (Input.GetMouseButtonDown(0) && !tile.isPaddock && !tile.isPath) { if (tile.IsAccessible) { if (currency.sufficientFunds(decorationCost)) { decoClone = decorations.pickDecoration(decoSelected); decoClone.transform.rotation = spawnedDeco.transform.rotation; decoClone.transform.position = new Vector3(tile.transform.position.x + 5, tile.transform.position.y + 3, tile.transform.position.z + 5); tile.IsAccessible = false; currency.takeIncome(decorationCost); decoClone.transform.parent = tile.transform; level.addExp(standardExp); } } // buttons.setButtons(true); Destroy(spawnedDeco); placingDeco = false; } }