Ejemplo n.º 1
0
 public void Initialize(MazeRoom room)
 {
     room.Add(this);
     floorRenderer          = transform.GetChild(0).GetComponent <Renderer>();
     floorRenderer.material = room.settings.floorMaterial;
     currentColor           = room.settings.floorMaterial.color;
 }
Ejemplo n.º 2
0
 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;
    }
Ejemplo n.º 4
0
 public void Initialize(MazeRoom room)
 {
     room.Add(this);
     Floor.material = room.settings.FloorMaterial;
     if (HasLight)
     {
         Instantiate(LightPrefab, LightParent);
     }
 }
Ejemplo n.º 5
0
 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";
     }
 }
Ejemplo n.º 6
0
 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;
     }
 }
Ejemplo n.º 7
0
 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;
     }
 }
Ejemplo n.º 8
0
 public void Initialize(MazeRoom room)
 {
     room.Add(this);
     transform.GetChild(0).GetComponent <Renderer>().material = room.settings.floorMaterial;
 }
Ejemplo n.º 9
0
 public void Initialize(MazeRoom room)
 {
     room.Add(this);
     transform.GetChild(0).GetComponent<Renderer>().material = room.settings.floorMaterial;
 }
Ejemplo n.º 10
0
 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;
 }
Ejemplo n.º 11
0
 public void Initialize(MazeRoom room)
 {
     room.Add(this);
 }
Ejemplo n.º 12
0
 public void SetRoom(MazeRoom _room)
 {
     _room.Add(this);
     this.transform.GetChild(0).GetComponent <Renderer> ().material = _room.setting.floorMaterial;
     this.transform.tag = _room.setting.RoomType;
 }