mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-12 03:39:10 +00:00
WIP: port alien swarm and extend engine for asw
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
// Just a bunch of tests that don't mean anything at present.
|
||||
|
||||
global WhatsMyName = function()
|
||||
{
|
||||
print("m_name = ", .m_name);
|
||||
print("this = ", this);
|
||||
|
||||
if(.IsValid())
|
||||
{
|
||||
.SetPos(23.0f, 56.0f);
|
||||
print("position(", .GetPosX(), ",", .GetPosY(), ")");
|
||||
|
||||
global g_globalObj = this;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
global RunGlobalObject = function ()
|
||||
{
|
||||
g_globalObj:WhatsMyName();
|
||||
};
|
||||
|
||||
|
||||
global ThreadYieldTest = function()
|
||||
{
|
||||
count = 0;
|
||||
while(count < 30)
|
||||
{
|
||||
sleep(0.5f);
|
||||
count += 1;
|
||||
print("count=",count);
|
||||
yield();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Console.SetColor(COLOR_RED, COLOR_BLACK);
|
||||
Console.Print("Red");
|
||||
Console.SetColor(COLOR_GREEN, COLOR_BLACK);
|
||||
Console.Print("Green");
|
||||
Console.Print("\n");
|
||||
Console.SetColor(COLOR_WHITE, COLOR_BLACK);
|
||||
|
||||
print("Script compiled and executed. \n");
|
||||
Reference in New Issue
Block a user