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 |
/** * * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class ColorScaleVolume extends Volume hidecategories(Collision,Brush,Attachment,Volume) placeable; /** Desired color scale upon entering volume */ var() vector ColorScale; /** Interpolation time for the color scale */ var() float InterpTime; event Touch(Actor Other, PrimitiveComponent OtherComp, vector HitLocation, vector HitNormal) { local Pawn P; local PlayerController PC; Super.Touch(Other,OtherComp,HitLocation,HitNormal); // check to see if we're touching a player controlled pawn P = Pawn(Other); if (P != None) { PC = PlayerController(P.Controller); // with a valid camera if (PC != None && PC.PlayerCamera != None) { // apply the entry scale PC.PlayerCamera.SetDesiredColorScale(ColorScale,InterpTime); } } } event UnTouch(Actor Other) { local Pawn P; local PlayerController PC; local vector DesiredColorScale; local float DesiredInterpTime; local int Idx; local ColorScaleVolume CSV; Super.UnTouch(Other); // check to see if we're touching a player controlled pawn P = Pawn(Other); if (P != None) { PC = PlayerController(P.Controller); // with a valid camera if (PC != None && PC.PlayerCamera != None) { // defult to the level color scale DesiredColorScale = WorldInfo.DefaultColorScale; DesiredInterpTime = 1.f; // look for any other color scale volumes for (Idx = P.Touching.Length; Idx >= 0; --Idx) { CSV = ColorScaleVolume(P.Touching[Idx]); if (CSV != None && CSV != self) { // set the desired values based on the CSV's DesiredColorScale = CSV.ColorScale; DesiredInterpTime = CSV.InterpTime; // and stop looking break; } } // apply the exit scale PC.PlayerCamera.SetDesiredColorScale(DesiredColorScale,DesiredInterpTime); } } } defaultproperties { ColorScale=(X=1.000000,Y=1.000000,Z=1.000000) InterpTime=1.000000 Begin Object Class=BrushComponent Name=BrushComponent0 ObjName=BrushComponent0 Archetype=BrushComponent'Engine.Default__Volume:BrushComponent0' ObjectArchetype=BrushComponent'Engine.Default__Volume:BrushComponent0' End Object BrushComponent=BrushComponent0 Components(0)=BrushComponent0 CollisionComponent=BrushComponent0 CollisionType=COLLIDE_CustomDefault Name="Default__ColorScaleVolume" ObjectArchetype=Volume'Engine.Default__Volume' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |