Core.Object | +--Engine.Actor | +--Engine.HUD | +--Botpack.ChallengeHUD | +--Botpack.ChallengeTeamHUD | +--Botpack.AssaultHUD
string
IdentifyAssault
simulated
DrawFragCount(Canvas Canvas)
DrawGameSynopsis(Canvas Canvas)
DrawTimeAt(Canvas Canvas, float X, float Y)
bool
SpecialIdentify(Canvas Canvas, Actor Other)
00001 //============================================================================= 00002 // AssaultHUD 00003 //============================================================================= 00004 class AssaultHUD extends ChallengeTeamHUD; 00005 00006 var localized string IdentifyAssault; 00007 00008 simulated function DrawFragCount(Canvas Canvas) 00009 { 00010 local float Y; 00011 00012 if ( bHideAllWeapons || (HudScale * WeaponScale * Canvas.ClipX <= Canvas.ClipX - 256 * Scale) ) 00013 Y = Canvas.ClipY - 128 * Scale; 00014 else 00015 Y = Canvas.ClipY - 192 * Scale; 00016 00017 DrawTimeAt(Canvas, 2, Y); 00018 00019 Super.DrawFragCount(Canvas); 00020 } 00021 00022 simulated function DrawGameSynopsis(Canvas Canvas) 00023 { 00024 } 00025 00026 simulated function DrawTimeAt(Canvas Canvas, float X, float Y) 00027 { 00028 local int Minutes, Seconds, d; 00029 00030 if ( PlayerOwner.GameReplicationInfo == None ) 00031 return; 00032 00033 Canvas.DrawColor = RedColor; 00034 Canvas.CurX = X; 00035 Canvas.CurY = Y; 00036 Canvas.Style = Style; 00037 00038 if ( PlayerOwner.GameReplicationInfo.RemainingTime > 0 ) 00039 { 00040 Minutes = PlayerOwner.GameReplicationInfo.RemainingTime/60; 00041 Seconds = PlayerOwner.GameReplicationInfo.RemainingTime % 60; 00042 } 00043 else 00044 { 00045 Minutes = 0; 00046 Seconds = 0; 00047 } 00048 00049 if ( Minutes > 0 ) 00050 { 00051 if ( Minutes >= 10 ) 00052 { 00053 d = Minutes/10; 00054 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, d*25, 0, 25.0, 64.0); 00055 Canvas.CurX += 7*Scale; 00056 Minutes= Minutes - 10 * d; 00057 } 00058 else 00059 { 00060 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, 0, 0, 25.0, 64.0); 00061 Canvas.CurX += 7*Scale; 00062 } 00063 00064 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, Minutes*25, 0, 25.0, 64.0); 00065 Canvas.CurX += 7*Scale; 00066 } else { 00067 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, 0, 0, 25.0, 64.0); 00068 Canvas.CurX += 7*Scale; 00069 } 00070 Canvas.CurX -= 4 * Scale; 00071 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, 32, 64, 25.0, 64.0); 00072 Canvas.CurX += 3 * Scale; 00073 00074 d = Seconds/10; 00075 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, 25*d, 0, 25.0, 64.0); 00076 Canvas.CurX += 7*Scale; 00077 00078 Seconds = Seconds - 10 * d; 00079 Canvas.DrawTile(Texture'BotPack.HudElements1', Scale*25, 64*Scale, 25*Seconds, 0, 25.0, 64.0); 00080 Canvas.CurX += 7*Scale; 00081 } 00082 00083 simulated function bool SpecialIdentify(Canvas Canvas, Actor Other ) 00084 { 00085 local float XL, YL; 00086 00087 if ( !Other.IsA('FortStandard') ) 00088 return false; 00089 00090 Canvas.Font = MyFonts.GetSmallFont( Canvas.ClipX ); 00091 Canvas.DrawColor = RedColor * IdentifyFadeTime * 0.333; 00092 Canvas.StrLen(IdentifyAssault, XL, YL); 00093 Canvas.SetPos(Canvas.ClipX/2 - XL/2, Canvas.ClipY - 74); 00094 Canvas.DrawText(IdentifyAssault); 00095 00096 return true; 00097 } 00098 00099 defaultproperties 00100 { 00101 IdentifyAssault=" !! Assault Target !! " 00102 ServerInfoClass=Class'Botpack.ServerInfoAS' 00103 }