Advertisement
Guest User

Untitled

a guest
Apr 19th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. --@Author: Alex2009, Sven777b
  2. --@Web: www.alex2009.de, www.LS-Landtechnik.com
  3.  
  4. waterTankPlaceable = {};
  5. waterTankPlaceable_mt = Class(waterTankPlaceable, Placeable);
  6. InitObjectClass(waterTankPlaceable, "waterTankPlaceable");
  7.  
  8. function waterTankPlaceable:new(isServer, isClient, customMt)
  9. local self = Placeable:new(isServer, isClient, waterTankPlaceable_mt);
  10. registerObjectClassName(self, "waterTankPlaceable");
  11. return self;
  12. end;
  13.  
  14. function waterTankPlaceable:delete()
  15. removeTrigger(self.SprayerFillTriggerId);
  16. unregisterObjectClassName(self);
  17. waterTankPlaceable:superClass().delete(self);
  18. end;
  19.  
  20. function waterTankPlaceable:deleteFinal()
  21. waterTankPlaceable:superClass().deleteFinal(self);
  22. end;
  23.  
  24. function waterTankPlaceable:load(xmlFilename, x,y,z, rx,ry,rz, moveMode, initRandom)
  25. if not waterTankPlaceable:superClass().load(self, xmlFilename, x,y,z, rx,ry,rz, moveMode, initRandom) then
  26. return false;
  27. end;
  28. local xmlFile = loadXMLFile("TempXML", xmlFilename);
  29. self.SprayerFillTriggerId = Utils.indexToObject(self.nodeId, getXMLString(xmlFile, "placeable.FillTrigger#index"));
  30. FillTrigger:onCreate(self.SprayerFillTriggerId);
  31. delete(xmlFile);
  32. return true;
  33. end;
  34.  
  35. function waterTankPlaceable:update(dt)
  36. end;
  37. registerPlaceableType("waterTankPlaceable", waterTankPlaceable);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement