public void Initialize(MazeRoom room) { room.Add(this); floorRenderer = transform.GetChild(0).GetComponent <Renderer>(); floorRenderer.material = room.settings.floorMaterial; currentColor = room.settings.floorMaterial.color; }
public void Initialize(MazeRoom room) { if (FindObjectOfType <Maze>().doorProbability != 0) { room.Add(this); } }
/// <summary> /// Initializing room. /// </summary> /// <param name="room">A room in maze.</param> public void Initialize(MazeRoom room) { // Assigning the right materials. room.Add(this); // Insert material. transform.GetChild(0).GetComponent <Renderer>().material = room.Settings.FloorMaterial; }
public void Initialize(MazeRoom room) { room.Add(this); Floor.material = room.settings.FloorMaterial; if (HasLight) { Instantiate(LightPrefab, LightParent); } }
public void Initialize(MazeRoom room) { room.Add(this); transform.GetChild(0).GetComponent <Renderer>().material = room.settings.floorMaterial; if (room.settings.floorMaterial == t) { GameObject spawn = Instantiate(cubv, new Vector3(transform.position.x, transform.position.y, transform.position.z), Quaternion.identity); spawn.name = "test"; spawn.tag = "maze"; } }
public void Initialize(MazeRoom room) { room.Add(this); Renderer[] rends = GetComponentsInChildren <Renderer>(); foreach (var r in rends) { r.material = room.settings.floorMaterial; } for (int i = 0; i < initializedCorners.Length; i++) { initializedCorners[i] = false; } }
public void Initialize(MazeRoom room, bool decoration, bool useShaderMaterials) { room.Add(this); if (decoration && room.settings.Decor.Length > 0) { decor = Instantiate(room.settings.Decor[Random.Range(0, room.settings.Decor.Length)], transform.position, Quaternion.identity) as GameObject; decor.transform.parent = transform; AISpawnable = false; } if (useShaderMaterials) { transform.GetChild(0).GetComponent <Renderer>().material = room.settings.floorMaterial; } }
public void Initialize(MazeRoom room) { room.Add(this); transform.GetChild(0).GetComponent <Renderer>().material = room.settings.floorMaterial; }
public void Initialize(MazeRoom room) { room.Add(this); transform.GetChild(0).GetComponent<Renderer>().material = room.settings.floorMaterial; }
public void Initialize(MazeRoom room) { room.Add(this); //Debug.Log("Setting Room Material to " + room.settings.floorMaterial.name); transform.GetChild(0).GetComponent <Renderer>().material = room.settings.floorMaterial; }
public void Initialize(MazeRoom room) { room.Add(this); }
public void SetRoom(MazeRoom _room) { _room.Add(this); this.transform.GetChild(0).GetComponent <Renderer> ().material = _room.setting.floorMaterial; this.transform.tag = _room.setting.RoomType; }