public override void Interact() { base.Interact(); if (empty) { BuildingsPresets buildingMenu = Resources.Load("Prefabs/ScriptableObjects/ElementyUI") as BuildingsPresets; GameControllerScript.Instance.currentGridPoint = this; Instantiate(buildingMenu.budynki[0]); GameControllerScript.Instance.SetRayFromCamera(false); } model.GetComponent <Renderer>().material = Resources.Load("Prefabs/Materials/Touched") as Material; }
private void Start() { m_natureMap = GetComponent <MapNatureGenerator>(); size = 8; gridPrefab = Resources.Load("Prefabs/Grid/GridPoint") as GameObject; gridBasePrefab = Resources.Load("Prefabs/Objects/Odlamki/Prefabs/baseGrid") as GameObject; gridConteiner.transform.position = new Vector3(gridConteiner.transform.position.x - size / 2f, gridConteiner.transform.position.y, gridConteiner.transform.position.z - size / 2f); GameObject ground = Instantiate(gridBasePrefab, groundConteriner.transform); ground.transform.localScale = new Vector3(ground.transform.localScale.x * size, ground.transform.localScale.y, ground.transform.localScale.z * size); m_smog = ground.GetComponent <BaseGrid>().m_smog; buildMode = GameControllerScript.Instance.GetBuildMode(); CreateUnlockButton(); neutralBuilidings = Resources.Load("Prefabs/ScriptableObjects/ModeleZasobow") as BuildingsPresets; CreateGrid(size); }