Ejemplo n.º 1
0
        protected override void InitializeOther(GameObject itemGo) {
            base.InitializeOther(itemGo);
            _glowBillboard = itemGo.GetSingleInterfaceInChildren<IBillboard>();

            var starLight = itemGo.GetComponentInChildren<Light>();
            // UNCLEAR no runtime assessable option to set Baking = Realtime
            starLight.type = LightType.Point;
            starLight.range = References.GameManager.GameSettings.UniverseSize.Radius(); //References.DebugControls.UniverseSize.Radius();
            starLight.intensity = 1F;
            //starLight.bounceIntensity = 1F; // bounce light shadowing not currently supported for point lights
            starLight.shadows = LightShadows.None;  // point light shadows are expensive
            starLight.renderMode = LightRenderMode.Auto;
            starLight.cullingMask = StarLightCullingMask;
            starLight.enabled = true;

            _revolvers = itemGo.GetSafeInterfacesInChildren<IRevolver>();
            //_revolvers.ForAll(r => r.IsActivated = false);  // enabled = false in Awake
            //TODO Revolver settings
        }