TerrificTable55

Untitled

Sep 1st, 2022
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. new TestMod->Module("TestMod", KEY_K, COMBAT) {
  2. init {
  3. addSetting(new dummyBooleanSetting->Setting("DummyBooleanSetting", true): Boolean)
  4. addSetting(new dummySliderSetting->Setting("DummySliderSetting", 1, 0.1, 10, false): Double)
  5. addSetting(new dummyColorSetting->Setting("DummyColorSetting", Color(255, 255, 255, 255)): Color)
  6. }
  7.  
  8. onUpdate {
  9.  
  10. Chat.addChatMessage("TestMod")
  11. Chat.addChatMessage("Boolean: " + dummyBooleanSetting.val)
  12. Chat.addChatMessage("Slider: " + dummySliderSetting.val)
  13. Chat.addChatMessage("Color: " + dummyColorSetting.val)
  14.  
  15. @Java{
  16. import ...
  17.  
  18. class init {
  19. public void test_func() {}
  20. }
  21. }().test_func()
  22.  
  23. // asign `test_class` variable to Java Class
  24. var test_class: JavaClass = @Java{
  25. import ...
  26.  
  27. class test_class {
  28. public void another_test_func() {}
  29. }
  30. }()
  31. test_class.another_test_func() // call `another_test_func` from the JavaClass
  32.  
  33.  
  34. }
  35.  
  36.  
  37. onEvent -> EventRender2D {
  38. Render.drawRect(100, 100, 150, 120, Color(255, 255, 255, 255)) // draw rectangle from `100`, `100` to `150`, `120`
  39. }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment