Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new TestMod->Module("TestMod", KEY_K, COMBAT) {
- init {
- addSetting(new dummyBooleanSetting->Setting("DummyBooleanSetting", true): Boolean)
- addSetting(new dummySliderSetting->Setting("DummySliderSetting", 1, 0.1, 10, false): Double)
- addSetting(new dummyColorSetting->Setting("DummyColorSetting", Color(255, 255, 255, 255)): Color)
- }
- onUpdate {
- Chat.addChatMessage("TestMod")
- Chat.addChatMessage("Boolean: " + dummyBooleanSetting.val)
- Chat.addChatMessage("Slider: " + dummySliderSetting.val)
- Chat.addChatMessage("Color: " + dummyColorSetting.val)
- @Java{
- import ...
- class init {
- public void test_func() {}
- }
- }().test_func()
- // asign `test_class` variable to Java Class
- var test_class: JavaClass = @Java{
- import ...
- class test_class {
- public void another_test_func() {}
- }
- }()
- test_class.another_test_func() // call `another_test_func` from the JavaClass
- }
- onEvent -> EventRender2D {
- Render.drawRect(100, 100, 150, 120, Color(255, 255, 255, 255)) // draw rectangle from `100`, `100` to `150`, `120`
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment