| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- function Prototyping::onCreate(%this)
- {
- }
- function Prototyping::onDestroy(%this)
- {
- }
- //This is called when the server is initially set up by the game application
- function Prototyping::initServer(%this)
- {
- }
- //This is called when the server is created for an actual game/map to be played
- function Prototyping::onCreateGameServer(%this)
- {
- //These are common managed data files. For any datablock-based stuff that gets generated by the editors
- //(that doesn't have a specific associated file, like data for a player class) will go into these.
- //So we'll register them now if they exist.
- %this.registerDatablock("./scripts/managedData/managedDatablocks");
- %this.registerDatablock("./scripts/managedData/managedForestItemData");
- %this.registerDatablock("./scripts/managedData/managedForestBrushData");
- %this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
- %this.registerDatablock("./scripts/managedData/managedParticleData");
- }
- //This is called when the server is shut down due to the game/map being exited
- function Prototyping::onDestroyGameServer(%this)
- {
- }
- //This is called when the client is initially set up by the game application
- function Prototyping::initClient(%this)
- {
- }
- //This is called when a client connects to a server
- function Prototyping::onCreateClientConnection(%this)
- {
- if (!isObject(screen_Canvas))
- {
- new GuiOffscreenCanvas(screen_Canvas) {
- targetName = "screen_Canvas";
- targetSize = "1280 720";
- dynamicTarget = false;
- canInteract = true;
- maxInteractDistance = "3";
- active = false;
- };
- }
- if(isObject(OptionsMenu))
- {
- screen_Canvas.setContent(OptionsMenu);
- }
- }
- //This is called when a client disconnects from a server
- function Prototyping::onDestroyClientConnection(%this)
- {
- }
|