public void Init(Flashlight oldComponent)
 {
     _lights      = oldComponent.GetValue <OWLight2[]>("_lights");
     _root        = oldComponent.GetValue <Transform>("_root");
     _basePivot   = oldComponent.GetValue <Transform>("_basePivot");
     _wobblePivot = oldComponent.GetValue <Transform>("_wobblePivot");
 }
Ejemplo n.º 2
0
        public void Init(Flashlight oldComponent)
        {
            _lights      = oldComponent.GetValue <OWLight2[]>("_lights");
            _root        = oldComponent.GetValue <Transform>("_root");
            _basePivot   = oldComponent.GetValue <Transform>("_basePivot");
            _wobblePivot = oldComponent.GetValue <Transform>("_wobblePivot");
            Destroy(oldComponent.GetComponent <LightLOD>());

            foreach (var light in _lights)
            {
                light.GetLight().enabled = false;
                light.GetLight().shadows = LightShadows.Soft;
            }
            FlashlightOn = false;
        }