UnrealShare
Class Bubble

source: e:\games\UnrealTournament\UnrealShare\Classes\Bubble.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Effects
         |
         +--UnrealShare.Bubble
Direct Known Subclasses:None

class Bubble
extends Engine.Effects

//============================================================================= // Bubble. //=============================================================================

Function Summary
 
simulated
BeginPlay()
 
simulated
ZoneChange(ZoneInfo NewZone)



Source Code


00001	//=============================================================================
00002	// Bubble.
00003	//=============================================================================
00004	class Bubble extends Effects;
00005	
00006	
00007	#exec MESH IMPORT MESH=SBubbles ANIVFILE=MODELS\SRocket_a.3D DATAFILE=MODELS\SRocket_d.3D X=0 Y=0 Z=0
00008	#exec MESH ORIGIN MESH=SBubbles X=0 Y=0 Z=0 YAW=0 ROLL=0 PITCH=0
00009	#exec MESH SEQUENCE MESH=SBubbles SEQ=All       STARTFRAME=0   NUMFRAMES=16
00010	#exec MESH SEQUENCE MESH=SBubbles SEQ=Ignite    STARTFRAME=0   NUMFRAMES=3
00011	#exec MESH SEQUENCE MESH=SBubbles SEQ=Flying    STARTFRAME=3   NUMFRAMES=13
00012	#exec TEXTURE IMPORT NAME=S_Bubble1 FILE=MODELS\Bubble1.PCX
00013	#exec TEXTURE IMPORT NAME=S_Bubble2 FILE=MODELS\Bubble2.PCX
00014	#exec TEXTURE IMPORT NAME=S_Bubble3 FILE=MODELS\Bubble3.PCX
00015	#exec MESHMAP SCALE MESHMAP=SBubbles  X=0.3 Y=0.3 Z=0.4
00016	
00017	simulated function ZoneChange( ZoneInfo NewZone )
00018	{
00019		if ( !NewZone.bWaterZone )
00020		{ 
00021			Destroy();
00022			PlaySound (EffectSound1);
00023		}	
00024	}
00025	
00026	simulated function BeginPlay()
00027	{
00028		Super.BeginPlay();
00029		if ( Level.NetMode != NM_DedicatedServer )
00030		{
00031			PlaySound(EffectSound2); //Spawned Sound
00032			LifeSpan = 3 + 4 * FRand();
00033			if (FRand()<0.3) Texture = texture'S_Bubble2';
00034			else if (FRand()<0.3) Texture = texture'S_Bubble3';
00035			LoopAnim('Flying',0.6);
00036		}
00037	}
00038	
00039	defaultproperties
00040	{
00041	     bNetOptional=True
00042	     Physics=PHYS_Falling
00043	     RemoteRole=ROLE_SimulatedProxy
00044	     LifeSpan=2.000000
00045	     DrawType=DT_Mesh
00046	     Style=STY_Translucent
00047	     Texture=Texture'UnrealShare.S_bubble1'
00048	     Mesh=LodMesh'UnrealShare.SBubbles'
00049	     DrawScale=0.200000
00050	     bUnlit=True
00051	     bParticles=True
00052	     Mass=3.000000
00053	     Buoyancy=5.000000
00054	}

End Source Code