Pos Lua >> Moon 1 1:[ local mod = ... ] >> 1:[ mod = ... ] 12 2:[ require("ext") ] >> 3:[ require "ext" ] 26 3:[ mod.width = 640 ] >> 4:[ mod.width = 640 ] 42 4:[ mod.height = 480 ] >> 5:[ mod.height = 480 ] 59 5:[ local win = am.window({ ] >> 6:[ win = am.window{ ] 83 6:[ title = "Fools Rush In", ] >> 7:[ title: "Fools Rush In" ] 107 7:[ width = mod.width, ] >> 8:[ width: mod.width ] 126 8:[ height = mod.height, ] >> 9:[ height: mod.height ] 151 9:[ clear_color = vec4(85 / 255, 180 / 255, 255 / 255, 255 / 255) ] >> 10:[ clear_color: vec4(85/255,180/255,255/255,255/255) ] 59 10:[ }) ] >> 6:[ win = am.window{ ] 191 11:[ mod.root = am.group() ] >> 12:[ mod.root = am.group() ] 213 12:[ mod.pips = 5 ] >> 13:[ mod.pips = 5 ] 226 13:[ local char = require("char") ] >> 14:[ char = require "char" ] 248 14:[ local player = require("player") ] >> 15:[ player = require "player" ] 297 16:[ LocalPlayer = player.LocalPlayer ] >> 16:[ import LocalPlayer from player ] 305 17:[ local util = require("util") ] >> 17:[ util = require "util" ] 327 18:[ local world = require("world") ] >> 18:[ world = require "world" ] 368 20:[ World = world.World ] >> 19:[ import World from world ] 375 21:[ local main_menu = require("main_menu") ] >> 20:[ main_menu = require "main_menu" ] 407 22:[ local rng_seed = am.eval_js("Math.random()") ] >> 21:[ rng_seed = am.eval_js("Math.random()") ] 446 23:[ math.randomseed(rng_seed * 1000) ] >> 22:[ math.randomseed(rng_seed*1000) ] 478 24:[ mod.screenpos = util.Vec2() ] >> 24:[ mod.screenpos = util.Vec2! ] 506 25:[ mod.reload = function() ] >> 26:[ mod.reload = () -> ] 561 26:[ mod.screen = am.group():tag("screen") ^ am.translate(0, 0) ] >> 28:[ mod.screen = am.group!\tag("screen")^ am.translate(0,0)--Things that should draw on top of everything else, like a hud ] 681 27:[ mod.world_close = am.group():tag("close") ^ am.translate(0, 0) ] >> 29:[ mod.world_close = am.group!\tag("close")^ am.translate(0,0)--Things that should draw "close to the camera", fast-parallax background ] 815 28:[ mod.world = am.translate(0, 0) ^ am.group({ ] >> 30:[ mod.world = am.translate(0,0) ^ am.group({ ] 860 29:[ am.group():tag("world_front"), ] >> 31:[ am.group!\tag("world_front"), -- things in front of players ] 922 30:[ am.group():tag("world_characters"), ] >> 32:[ am.group!\tag("world_characters"), -- players ] 970 31:[ am.group():tag("world_behind") ] >> 33:[ am.group!\tag("world_behind"), -- things behind players ] 815 32:[ }):tag("world") ] >> 30:[ mod.world = am.translate(0,0) ^ am.group({ ] 1082 33:[ mod.world_far = am.group():tag("far") ^ am.translate(0, 0) ] >> 35:[ mod.world_far = am.group!\tag("far")^ am.translate(0,0) --Things that move slowly in the background ] 1183 34:[ mod.background = am.group():tag("bg") ] >> 36:[ mod.background = am.group!\tag("bg")--The background does not move, draws behind everything. ] 1277 35:[ mod.root = am.group({ ] >> 37:[ mod.root = am.group{ ] 1300 36:[ mod.background, ] >> 38:[ mod.background, ] 1318 37:[ mod.world_far, ] >> 39:[ mod.world_far, ] 1335 38:[ mod.world, ] >> 40:[ mod.world, ] 1348 39:[ mod.world_close, ] >> 41:[ mod.world_close, ] 1367 40:[ mod.screen ] >> 42:[ mod.screen, ] 1277 41:[ }) ] >> 37:[ mod.root = am.group{ ] 1383 42:[ win.scene = mod.root ] >> 44:[ win.scene = mod.root ] 1405 43:[ mod.action_queue = { ] >> 45:[ mod.action_queue = { ] 1429 45:[ main_menu.load, ] >> 46:[ {main_menu.load, {}} ] 1405 48:[ } ] >> 45:[ mod.action_queue = { ] 1455 49:[ mod.root:action(coroutine.create(function() ] >> 49:[ mod.root\action(coroutine.create(() -> ] 1501 50:[ while true do ] >> 50:[ while true ] 1512 51:[ if mod.server then ] >> 51:[ if mod.server ] 1528 52:[ mod.server:update() ] >> 52:[ mod.server\update! ] 1510 53:[ end ] >> 51:[ if mod.server ] 1550 54:[ coroutine.yield() ] >> 53:[ coroutine.yield! ] 1496 55:[ end ] >> 50:[ while true ] 1455 56:[ end)) ] >> 49:[ mod.root\action(coroutine.create(() -> ] 1572 57:[ return mod.root:action(coroutine.create(function() ] >> 55:[ mod.root\action(coroutine.create(() -> ] 1618 58:[ while true do ] >> 56:[ while true ] 1627 59:[ local start_time = am.current_time() ] >> 57:[ start_time = am.current_time! ] 1660 60:[ mod.world.x = -mod.screenpos.x ] >> 58:[ mod.world.x = -mod.screenpos.x ] 1694 61:[ mod.world.y = -mod.screenpos.y ] >> 59:[ mod.world.y = -mod.screenpos.y ] 1730 62:[ if #mod.action_queue > 0 then ] >> 60:[ if #mod.action_queue > 0 ] 1757 63:[ local action = table.remove(mod.action_queue) ] >> 61:[ action = table.remove(mod.action_queue) ] 1801 64:[ local f, args = action[1], action[2] ] >> 62:[ f, args = action[1], action[2] ] 1836 65:[ f(unpack(args)) ] >> 63:[ f(unpack(args)) ] 1728 66:[ end ] >> 60:[ if #mod.action_queue > 0 ] 1857 67:[ if mod.world then ] >> 64:[ if mod.world ] 1872 68:[ mod.world:update() ] >> 65:[ mod.world\update! ] 1855 69:[ end ] >> 64:[ if mod.world ] 1893 70:[ local end_time = am.current_time() ] >> 66:[ end_time = am.current_time! ] 1925 71:[ coroutine.yield() ] >> 68:[ coroutine.yield! ] 1613 72:[ end ] >> 56:[ while true ] 1572 73:[ end)) ] >> 55:[ mod.root\action(coroutine.create(() -> ] 506 74:[ end ] >> 26:[ mod.reload = () -> ] 1946 75:[ mod.reload() ] >> 70:[ mod.reload! ] 1958 76:[ mod.win = win ] >> 71:[ mod.win = win ] 1972 77:[ return mod ] >> 72:[ mod ]