Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

UnrealShare.UIFlora


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
//===================================================
// Parent class for all TCO plants
//===================================================
// This simple code plays sound, when player
// is in plant collision radius
//===================================================
// code by Raven
class UIFlora extends Decoration;


#exec AUDIO IMPORT FILE="Sounds\Shrub\shrub1_01.wav" NAME="shrub1" GROUP="shrub"
#exec AUDIO IMPORT FILE="Sounds\Shrub\shrub1_02.wav" NAME="shrub2" GROUP="shrub"
#exec AUDIO IMPORT FILE="Sounds\Shrub\shrub1_03.wav" NAME="shrub3" GROUP="shrub"

var() sound SSound1; //Sound 1
var() sound SSound2; //Sound 2
var() sound SSound3; //Sound 3
var() bool bBushSound;
var() float SSoundVolume;
var PlayerPawn RP;

//replication
//{
// Variables the server should send to the client.
//	reliable if( Role==ROLE_Authority )
//		SSound1, SSound2, SSound3, bBushSound;
//}

simulated function Touch( actor Other )
{
	local float rnd;

	if (!bBushSound)
		return;
	rnd = FRand();

	if ( rnd < 0.34 )
		PlaySound(SSound1,SLOT_None,SSoundVolume);
	else if (rnd < 0.67 )
		PlaySound(SSound2,SLOT_None,SSoundVolume);
	else
		PlaySound(SSound3,SLOT_None,SSoundVolume);
}

simulated function Landed( vector HitNormal )
{
	SetPhysics(PHYS_None);
}

defaultproperties
{
				SSound1=Sound'UnrealShare.shrub.shrub3'
				SSoundVolume=64.000000
				bStatic=False
				DrawType=DT_Mesh
				bCollideActors=True
				bCollideWorld=True
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: zo 11-11-2012 21:10:28.000 - Creation time: zo 11-11-2012 21:14:21.100 - Created with UnCodeX