[[TableOfContents]]
= 2012.07.04 =
{{{#!vim java
// EmeraldStage/ESGameInfo.uc
class ESGameInfo extends UTDeathmatch;
// definition of member variable, assigning value is done at defaultproperties function
var int a;
// Its behavior is similarly to constructor.
DefaultProperties
{
// Extend PlayerController class to custom class
PlayerControllerClass = class'ESPlayerController';
}
// Event occured when character logged in(or creation). There are existing function PreLogin, PostLogin functions.
event PlayerController Login(string portal, string options, const UniqueNetId uniqueID, out string errorMsg)
{
local PlayerController pc;
pc = super.Login(portal, options, uniqueID, errorMsg);
return pc;
}
event PostLogin(PlayerController pc)
{
`log("Hello World!");
`log(pc.Name@"logged in");
super.PostLogin(pc);
}
}}}
{{{#!vim javascript
// EmeraldStage/ESPlayerController.uc
class ESPlayerController extends UTPlayerController;
DefaultProperties
{
}
event Tick(float deltaTime)
{
// called every update time
`log("tick!");
}
}}}
----
[2012년활ë™ì§€ë„], [UDK/2012년스터디]