Prototyping.tscript 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. function Prototyping::onCreate(%this)
  2. {
  3. }
  4. function Prototyping::onDestroy(%this)
  5. {
  6. }
  7. //This is called when the server is initially set up by the game application
  8. function Prototyping::initServer(%this)
  9. {
  10. }
  11. //This is called when the server is created for an actual game/map to be played
  12. function Prototyping::onCreateGameServer(%this)
  13. {
  14. //These are common managed data files. For any datablock-based stuff that gets generated by the editors
  15. //(that doesn't have a specific associated file, like data for a player class) will go into these.
  16. //So we'll register them now if they exist.
  17. if(isFile("./scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension))
  18. %this.registerDatablock("./scripts/managedData/managedDatablocks");
  19. if(isFile("./scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension))
  20. %this.registerDatablock("./scripts/managedData/managedForestItemData");
  21. if(isFile("./scripts/managedData/managedForestBrushData." @ $TorqueScriptFileExtension))
  22. %this.registerDatablock("./scripts/managedData/managedForestBrushData");
  23. if(isFile("./scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension))
  24. %this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
  25. if(isFile("./scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension))
  26. %this.registerDatablock("./scripts/managedData/managedParticleData");
  27. }
  28. //This is called when the server is shut down due to the game/map being exited
  29. function Prototyping::onDestroyGameServer(%this)
  30. {
  31. }
  32. //This is called when the client is initially set up by the game application
  33. function Prototyping::initClient(%this)
  34. {
  35. //class method prototyping
  36. %this.queueExec("./UI/classPrototyping");
  37. %this.queueExec("./UI/classPrototyping.gui");
  38. }
  39. //This is called when a client connects to a server
  40. function Prototyping::onCreateClientConnection(%this)
  41. {
  42. }
  43. //This is called when a client disconnects from a server
  44. function Prototyping::onDestroyClientConnection(%this)
  45. {
  46. }