SFScoutBot.SFScoutBotHUD

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
//=============================================================================
// Spatial Fear
// Class: SFScoutBotHUD
// Description: HUD used wheb ScoutBot is activated.
//              The one here is just an example.
//
// Author:  Jacek Zagrodzki
//=============================================================================
class SFScoutBotHUD extends ChallengeHUD;

#exec TEXTURE IMPORT NAME=SFScoutBotHUD1 FILE=TEXTURES\SFScoutBotHUD1.pcx GROUP=Icons FLAGS=2
#exec TEXTURE IMPORT NAME=SFScoutBotHUD2 FILE=TEXTURES\SFScoutBotHUD2.pcx GROUP=Icons FLAGS=2
#exec TEXTURE IMPORT NAME=SFScoutBotHUD3 FILE=TEXTURES\SFScoutBotHUD3.pcx GROUP=Icons FLAGS=2
#exec TEXTURE IMPORT NAME=SFScoutBotHUD4 FILE=TEXTURES\SFScoutBotHUD4.pcx GROUP=Icons FLAGS=2


// Overwrite of base class function, because the owner is not a PlayerPawn anymore.
simulated function PostBeginPlay()
{
	local int i;

	if ( Level.NetMode != NM_Standalone )
		MOTDFadeOutTime = 350;
	FaceAreaOffset = -64;
	MyFonts = FontInfo(spawn(Class<Actor>(DynamicLoadObject(FontInfoClass, class'Class'))));
	Super(HUD).PostBeginPlay();
	SetTimer(1.0, True);

	ServerInfo = Spawn(ServerInfoClass, Owner);
}

function PostRender(canvas C)
{
	if(SFScoutBot(Owner).aPlayer.bBehindView)
		return;

	C.Style = ERenderStyle.STY_Masked;
	C.DrawColor.R = 0;
	C.DrawColor.G = 15;
	C.DrawColor.B = 40;

	C.SetPos(0, 0);
	C.DrawTile(texture'SFScoutBotHUD1', C.ClipX/2, C.ClipY/2, 0, 0, 256, 256);

	C.SetPos(C.ClipX/2, 0);
	C.DrawTile(texture'SFScoutBotHUD2', C.ClipX/2, C.ClipY/2, 0, 0, 256, 256);

	C.SetPos(0, C.ClipY/2);
	C.DrawTile(texture'SFScoutBotHUD3', C.ClipX/2, C.ClipY/2, 0, 0, 256, 256);

	C.SetPos(C.ClipX/2, C.ClipY/2);
	C.DrawTile(texture'SFScoutBotHUD4', C.ClipX/2, C.ClipY/2, 0, 0, 256, 256);
}

defaultproperties
{
}

class file time: 12/7/2003 3:58:26 PM - creation time: 12/7/2003 4:03:45 PM
Created with UnCodeX