示例#1
0
        /// <summary>
        /// Builds an influxSetup component on the given object, and populates it with the configuration specified in conf
        /// passes scene object that contains all widget location info
        /// </summary>
        /// <param name="conf">Scene to build</param>
        /// <param name="sceneObj">Object to parent scene config</param>
        private void BuildScene(DBScene conf, GameObject sceneObj)
        {
            InfluxSetup setup = sceneObj.AddComponent <InfluxSetup>();

            setup.Setup(conf);
            foreach (DBWidget wid in conf.Widgets)
            {
                CreateWidgets(wid, sceneObj);
            }
        }
            /// <summary>
            /// Sets the base database values - should be called before anything else!
            /// </summary>
            /// <param name="m">Measure name</param>
            /// <param name="b">Building</param>
            /// <param name="r">Room</param>
            public void SetDBVals(string m, string b, string r)
            {
                parent   = gameObject.GetComponentInParent <InfluxSetup>();
                measure  = m;
                building = b;
                room     = r;

                urlToQuery  = SetQueryUrl();
                urlToUpdate = SetQueryUrl();
            }