Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 |
/** * LensFlare source actor class. * Copyright 1998-2011 Epic Games, Inc. All Rights Reserved. */ class LensFlareSource extends Actor native(LensFlare) placeable; var() editconst const LensFlareComponent LensFlareComp; /** used to update status of toggleable level placed lens flares on clients */ var repnotify bool bCurrentlyActive; replication { if (bNoDelete) bCurrentlyActive; } cpptext { void AutoPopulateInstanceProperties(); // AActor interface. /** * Function that gets called from within Map_Check to allow this actor to check itself * for any potential errors and register them with map check dialog. */ #if WITH_EDITOR virtual void CheckForErrors(); #endif } //native noexport event SetTemplate(LensFlare NewTemplate); native final function SetTemplate(LensFlare NewTemplate); simulated event PostBeginPlay() { bCurrentlyActive = LensFlareComp.bIsActive; } /** * Handling Toggle event from Kismet. */ simulated function OnToggle(SeqAct_Toggle action) { // Turn ON if (action.InputLinks[0].bHasImpulse) { LensFlareComp.SetIsActive(TRUE); bCurrentlyActive = TRUE; } // Turn OFF else if (action.InputLinks[1].bHasImpulse) { LensFlareComp.SetIsActive(FALSE); bCurrentlyActive = FALSE; } // Toggle else if (action.InputLinks[2].bHasImpulse) { // If spawning is suppressed or we aren't turned on at all, activate. if (!bCurrentlyActive) { LensFlareComp.SetIsActive(TRUE); bCurrentlyActive = TRUE; } else { LensFlareComp.SetIsActive(FALSE); bCurrentlyActive = FALSE; } } LensFlareComp.LastRenderTime = WorldInfo.TimeSeconds; ForceNetRelevant(); } simulated event ReplicatedEvent(name VarName) { if (VarName == nameof(bCurrentlyActive)) { LensFlareComp.SetIsActive(bCurrentlyActive); LensFlareComp.LastRenderTime = WorldInfo.TimeSeconds; } } simulated function SetFloatParameter(name ParameterName, float Param) { /*** if (LensFlareComp != none) { LensFlareComp.SetFloatParameter(ParameterName, Param); } else { `log("Warning: Attempting to set a parameter on "$self$" when the PSC does not exist"); } ***/ } simulated function SetVectorParameter(name ParameterName, vector Param) { /*** if (LensFlareComp != none) { LensFlareComp.SetVectorParameter(ParameterName, Param); } else { `log("Warning: Attempting to set a parameter on "$self$" when the PSC does not exist"); } ***/ } simulated function SetColorParameter(name ParameterName, linearcolor Param) { /*** if (LensFlareComp != none) { LensFlareComp.SetColorParameter(ParameterName, Param); } else { `log("Warning: Attempting to set a parameter on "$self$" when the PSC does not exist"); } ***/ } simulated function SetExtColorParameter(name ParameterName, float Red, float Green, float Blue, float Alpha) { /*** local linearcolor c; if (LensFlareComp != none) { c.r = Red; c.g = Green; c.b = Blue; c.a = Alpha; LensFlareComp.SetColorParameter(ParameterName, C); } else { `log("Warning: Attempting to set a parameter on "$self$" when the PSC does not exist"); } ***/ } simulated function SetActorParameter(name ParameterName, actor Param) { /*** if (LensFlareComp != none) { LensFlareComp.SetActorParameter(ParameterName, Param); } else { `log("Warning: Attempting to set a parameter on "$self$" when the PSC does not exist"); } ***/ } /** * Kismet handler for setting particle instance parameters. */ /*** simulated function OnSetLensFlareParam(SeqAct_SetLensFlareParam Action) { local int Idx, ParamIdx; if ((LensFlareComp != None) && (Action.InstanceParameters.Length > 0)) { for (Idx = 0; Idx < Action.InstanceParameters.Length; Idx++) { if (Action.InstanceParameters[Idx].ParamType != PSPT_None) { // look for an existing entry ParamIdx = LensFlareComp.InstanceParameters.Find('Name',Action.InstanceParameters[Idx].Name); // create one if necessary if (ParamIdx == -1) { ParamIdx = LensFlareComp.InstanceParameters.Length; LensFlareComp.InstanceParameters.Length = ParamIdx + 1; } // update the instance parm LensFlareComp.InstanceParameters[ParamIdx] = Action.InstanceParameters[Idx]; if (Action.bOverrideScalar) { LensFlareComp.InstanceParameters[ParamIdx].Scalar = Action.ScalarValue; } } } } } ***/ defaultproperties { // Visual things should be ticked in parallel with physics TickGroup=TG_DuringAsyncWork Begin Object Class=SpriteComponent Name=Sprite Sprite=Texture2D'EditorResources.S_Emitter' HiddenGame=True AlwaysLoadOnClient=False AlwaysLoadOnServer=False bIsScreenSizeScaled=True ScreenSize=0.0025 End Object Components.Add(Sprite) // Inner cone visualization. Begin Object Class=DrawLightConeComponent Name=DrawInnerCone0 ConeColor=(R=150,G=200,B=255) End Object Components.Add(DrawInnerCone0) // Outer cone visualization. Begin Object Class=DrawLightConeComponent Name=DrawOuterCone0 ConeColor=(R=200,G=255,B=255) End Object Components.Add(DrawOuterCone0) // Light radius visualization. Begin Object Class=DrawLightRadiusComponent Name=DrawRadius0 End Object Components.Add(DrawRadius0) Begin Object Class=LensFlareComponent Name=LensFlareComponent0 PreviewInnerCone=DrawInnerCone0 PreviewOuterCone=DrawOuterCone0 PreviewRadius=DrawRadius0 End Object LensFlareComp=LensFlareComponent0 Components.Add(LensFlareComponent0) Begin Object Class=ArrowComponent Name=ArrowComponent0 ArrowColor=(R=0,G=255,B=128) ArrowSize=1.5 bTreatAsASprite=True AlwaysLoadOnClient=False AlwaysLoadOnServer=False End Object Components.Add(ArrowComponent0) bEdShouldSnap=true bHardAttach=true bGameRelevant=true bNoDelete=true } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |