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 |
/** * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved. */ class AnimatedCamera extends Camera notplaceable native; const MAX_ACTIVE_CAMERA_ANIMS = 8; /** Pool of anim instance objects available with which to play camera animations */ var protected CameraAnimInst AnimInstPool[MAX_ACTIVE_CAMERA_ANIMS]; /** Array of anim instances that are currently playing and in-use */ var protected array<CameraAnimInst> ActiveAnims; /** Array of anim instances that are not playing and available */ var protected array<CameraAnimInst> FreeAnims; /** Internal. Receives the output of individual camera animations. */ var protected transient DynamicCameraActor AnimCameraActor; /** Internal. Collects and blends the output of all of the camera animations, before being applied to the camera */ var protected transient DynamicCameraActor AccumulatorCameraActor; // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) // (cpptext) function PostBeginPlay() { local int Idx; super.PostBeginPlay(); // create CameraAnimInsts in pool for (Idx=0; Idx<MAX_ACTIVE_CAMERA_ANIMS; ++Idx) { AnimInstPool[Idx] = new(Self) class'CameraAnimInst'; // add everything to the free list initially FreeAnims[Idx] = AnimInstPool[Idx]; } // spawn the two temp CameraActors AnimCameraActor = Spawn(class'DynamicCameraActor', self,,,,, TRUE); AccumulatorCameraActor = Spawn(class'DynamicCameraActor', self,,,,, TRUE); } event Destroyed() { // clean up the temp camera actors AnimCameraActor.Destroy(); AccumulatorCameraActor.Destroy(); } event ApplyCameraModifiers(float DeltaTime, out TPOV OutPOV) { super.ApplyCameraModifiers(DeltaTime, OutPOV); // will handle this in native code ApplyCameraModifiersNative(DeltaTime, OutPOV); } /** Native version of ApplyCameraModifiers */ simulated private native function ApplyCameraModifiersNative(float DeltaTime, out TPOV OutPOV); // @fixme: need to return linkage to a particular instance? /** Play the indicated CameraAnim on this camera. */ simulated native function bool PlayCameraAnim(CameraAnim Anim, optional float Rate=1.f, optional float Scale=1.f, optional float BlendInTime, optional float BlendOutTime, optional bool bLoop, optional bool bRandomStartTime); /** * Stop playing all instances of the indicated CameraAnim. * bImmediate: TRUE to stop it right now, FALSE to blend it out over BlendOutTime. */ simulated native function StopCameraAnim(CameraAnim Anim, optional bool bImmediate); defaultproperties { Name="Default__AnimatedCamera" ObjectArchetype=Camera'Engine.Default__Camera' } |
Overview | Package | Class | Source | Class tree | Glossary | UnrealScript Documentation |
previous class next class | frames no frames |