예제 #1
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            SolidConduitTemperatureSensor conduitTemperatureSensor = go.AddOrGet <SolidConduitTemperatureSensor>();

            conduitTemperatureSensor.Threshold = 280f;
            conduitTemperatureSensor.ActivateAboveThreshold = true;
            conduitTemperatureSensor.rangeMin = 0f;
            conduitTemperatureSensor.rangeMax = 9999f;
        }
예제 #2
0
        private void OnCopySettings(object data)
        {
            GameObject gameObject = (GameObject)data;

            if (gameObject == null)
            {
                return;
            }
            SolidConduitTemperatureSensor component = gameObject.GetComponent <SolidConduitTemperatureSensor>();

            if (component == null)
            {
                return;
            }
            Threshold = component.Threshold;
            ActivateAboveThreshold = component.ActivateAboveThreshold;
        }