Organization and trying to do things
This commit is contained in:
parent
de3c1092ad
commit
7b12d9388c
|
@ -5,7 +5,7 @@ flat SLIME01 pic 1 tics 1 pic 1 tics 1
|
||||||
flat FWATER1 pic 1 tics 1 pic 1 tics 1
|
flat FWATER1 pic 1 tics 1 pic 1 tics 1
|
||||||
flat BLOOD1 pic 1 tics 1 pic 1 tics 1
|
flat BLOOD1 pic 1 tics 1 pic 1 tics 1
|
||||||
|
|
||||||
// warping Flats
|
// Warping Flats
|
||||||
warp2 flat NUKAGE1
|
warp2 flat NUKAGE1
|
||||||
warp flat LAVA1
|
warp flat LAVA1
|
||||||
warp2 flat SLIME01
|
warp2 flat SLIME01
|
||||||
|
|
46
ZSCRIPT.txt
46
ZSCRIPT.txt
|
@ -1,44 +1,12 @@
|
||||||
version "3.7.2"
|
version "3.8"
|
||||||
|
|
||||||
// Base
|
|
||||||
#include "ZScript/Util.zs"
|
#include "ZScript/Util.zs"
|
||||||
#include "ZScript/Player.zs"
|
#include "ZScript/Structs.zs"
|
||||||
#include "ZScript/Weapon.zs"
|
|
||||||
#include "ZScript/StatusBar.zs"
|
#include "ZScript/StatusBar.zs"
|
||||||
|
|
||||||
// Structs
|
// Base
|
||||||
#include "ZScript/Structs.zs"
|
#include "ZScript/Base/Player.zs"
|
||||||
|
#include "ZScript/Base/Weapon.zs"
|
||||||
|
|
||||||
class RLHUDHandler : StaticEventHandler
|
// Events
|
||||||
{
|
#include "ZScript/Events/HUDHandler.zs"
|
||||||
RLBasePlayer RLPlayer;
|
|
||||||
|
|
||||||
Vector2 Size;
|
|
||||||
|
|
||||||
override void OnRegister()
|
|
||||||
{
|
|
||||||
Super.OnRegister();
|
|
||||||
|
|
||||||
RLPlayer = RLBasePlayer(Players[0].MO);
|
|
||||||
|
|
||||||
Size = (320, 240);
|
|
||||||
}
|
|
||||||
|
|
||||||
override void RenderOverlay(RenderEvent e)
|
|
||||||
{
|
|
||||||
Super.RenderOverlay(e);
|
|
||||||
|
|
||||||
// DrawTexture("MEDIA0", 0, 20);
|
|
||||||
// DrawBigText("" .. RLPlayer.Medikit, "Brick", 16, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
ui void DrawBigText(string text, Color color, float x, float y) const
|
|
||||||
{
|
|
||||||
Screen.DrawText(Font.FindFont("BIGFONT"), color, x, y, text, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y));
|
|
||||||
}
|
|
||||||
|
|
||||||
ui void DrawTexture(string texture, float x, float y) const
|
|
||||||
{
|
|
||||||
Screen.DrawTexture(TexMan.CheckForTexture(texture, TexMan.Type_Any), true, x, y, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y), DTA_CenterOffset, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
29
ZScript/Events/HUDHandler.zs
Normal file
29
ZScript/Events/HUDHandler.zs
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
class RLHUDHandler : StaticEventHandler;
|
||||||
|
|
||||||
|
ui Vector2 Size;
|
||||||
|
|
||||||
|
override void RenderOverlay(RenderEvent e)
|
||||||
|
{
|
||||||
|
RLBasePlayer cam = RLBasePlayer(e.Camera);
|
||||||
|
|
||||||
|
Size = (320, 240);
|
||||||
|
|
||||||
|
if (cam)
|
||||||
|
DrawMedikit(RLBasePlayer(Players[ConsolePlayer].MO));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui void DrawMedikit(RLBasePlayer player)
|
||||||
|
{
|
||||||
|
DrawTexture("MEDIA0", 0, 20);
|
||||||
|
DrawBigText(string.Format("%d", player.Medikit), "Brick", 16, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
ui void DrawBigText(string text, Color color, float x, float y) const
|
||||||
|
{
|
||||||
|
Screen.DrawText(Font.FindFont("BIGFONT"), color, x, y, text, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui void DrawTexture(string texture, float x, float y) const
|
||||||
|
{
|
||||||
|
Screen.DrawTexture(TexMan.CheckForTexture(texture, TexMan.Type_Any), true, x, y, DTA_VirtualWidth, int(Size.X), DTA_VirtualHeight, int(Size.Y), DTA_CenterOffset, true);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user