Пример #1
0
        public override void DoPostConfigureComplete(GameObject go)
        {
            AdvancedSolidConduitTemperatureSensor conduitTemperatureSensor = go.AddOrGet <AdvancedSolidConduitTemperatureSensor>();

            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;
            }
            AdvancedSolidConduitTemperatureSensor component = gameObject.GetComponent <AdvancedSolidConduitTemperatureSensor>();

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