Exemple #1
0
        protected sealed override void PrepareProtoWeapon(
            out IEnumerable <IProtoItemAmmo> compatibleAmmoProtos,
            ref DamageDescription overrideDamageDescription)
        {
            compatibleAmmoProtos = null;
            var lightConfig = new ItemLightConfig()
            {
                IsLightEnabled = false
            };

            this.PrepareProtoWeaponEnergy(ref overrideDamageDescription, lightConfig);
            this.ItemLightConfig = lightConfig.ToReadOnly();
        }
        protected sealed override void PrepareProtoItemEquipmentHead()
        {
            var lightConfig = new ItemLightConfig();
            var fuelConfig  = new ItemFuelConfig();

            this.PrepareProtoItemEquipmentHeadWithLight(lightConfig, fuelConfig);
            this.ItemLightConfig = lightConfig.ToReadOnly();
            this.ItemFuelConfig  = fuelConfig.ToReadOnly();

            if (IsClient)
            {
                ClientEquipmentHeadWithLightInputToggle.Init();
            }
        }
        public static BaseClientComponentLightSource CreateLightSourceSpot(
            IClientSceneObject sceneObject,
            IReadOnlyItemLightConfig itemLightConfig,
            Vector2D?positionOffset = null)
        {
            if (!itemLightConfig.IsLightEnabled)
            {
                return(null);
            }

            return(CreateLightSourceSpot(
                       sceneObject,
                       itemLightConfig.Color,
                       size: (float)itemLightConfig.Size,
                       positionOffset: positionOffset));
        }
Exemple #4
0
        public static BaseClientComponentLightSource CreateLightSourceSpot(
            IClientSceneObject sceneObject,
            IReadOnlyItemLightConfig itemLightConfig,
            Vector2D?overrideWorldOffset = null)
        {
            if (!itemLightConfig.IsLightEnabled)
            {
                return(null);
            }

            return(CreateLightSourceSpot(
                       sceneObject,
                       itemLightConfig.Color,
                       size: itemLightConfig.Size,
                       logicalSize: itemLightConfig.LogicalSize,
                       positionOffset: overrideWorldOffset ?? itemLightConfig.WorldOffset));
        }
        public void Setup(
            IComponentSkeleton skeletonRenderer,
            IReadOnlyItemLightConfig lightConfig,
            BaseClientComponentLightSource lightSource,
            string skeletonSlotName,
            bool isPrimaryLight)
        {
            this.skeletonSlotName = skeletonSlotName;
            this.IsPrimary        = isPrimaryLight;

            this.lightConfig      = lightConfig;
            this.skeletonRenderer = skeletonRenderer;
            this.lightSource      = lightSource;

            // Don't use Update(0) here as the skeleton cannot be ready now:
            // the new sprites likely to be added to it after this call.
            this.lightSource.IsEnabled = false;
        }
        public void Setup(
            ICharacter character,
            IComponentSkeleton skeletonRenderer,
            IReadOnlyItemLightConfig lightConfig,
            BaseClientComponentLightSource lightSource,
            string skeletonAttachmentName,
            string skeletonBoneName)
        {
            this.skeletonAttachmentName = skeletonAttachmentName;
            this.skeletonBoneName       = skeletonBoneName;

            this.lightConfig      = lightConfig;
            this.character        = character;
            this.skeletonRenderer = skeletonRenderer;
            this.lightSource      = lightSource;

            this.LateUpdate(0);
        }
Exemple #7
0
        public void Setup(
            ICharacter character,
            IComponentSkeleton skeletonRenderer,
            IReadOnlyItemLightConfig lightConfig,
            BaseClientComponentLightSource lightSource,
            string skeletonAttachmentName,
            string skeletonBoneName)
        {
            this.skeletonAttachmentName = skeletonAttachmentName;
            this.skeletonBoneName       = skeletonBoneName;

            this.lightConfig      = lightConfig;
            this.character        = character;
            this.skeletonRenderer = skeletonRenderer;
            this.lightSource      = lightSource;

            // Don't use Update(0) here as the skeleton cannot be ready now:
            // the new sprites likely to be added to it after this call.
            this.lightSource.IsEnabled = false;
        }