private void Start() { Zone = FindZone(gameObject); Type = FindType(gameObject.name); Doors = FindDoors(gameObject); FlickerableLightController = GetComponentInChildren <FlickerableLightController>(); }
/// <summary> /// Initializes a new instance of the <see cref="Room"/> class. /// </summary> /// <param name="name">The room name.</param> /// <param name="transform">The room transform.</param> /// <param name="position">The room position.</param> public Room(string name, Transform transform, Vector3 position) { Name = name; Transform = transform; Position = position; Zone = FindZone(); Type = FindType(name); Doors = FindDoors(); flickerableLightController = transform.GetComponentInChildren <FlickerableLightController>(); }