Skip to content

Commit

Permalink
add joystick touch 4
Browse files Browse the repository at this point in the history
  • Loading branch information
stutxo committed Sep 4, 2023
1 parent 9ff4a4d commit 9395155
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 46 deletions.
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>☔ rain.run</title>
<script type="module">import init from './satrunner-248bf8019e7ac641.js';init('./satrunner-248bf8019e7ac641_bg.wasm');</script>
<script type="module">import init from './satrunner-d784bdbe7b7e5cbf.js';init('./satrunner-d784bdbe7b7e5cbf_bg.wasm');</script>


<style>
Expand All @@ -17,8 +17,8 @@
}
</style>

<link rel="preload" href="./satrunner-248bf8019e7ac641_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="./satrunner-248bf8019e7ac641.js"></head>
<link rel="preload" href="./satrunner-d784bdbe7b7e5cbf_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="./satrunner-d784bdbe7b7e5cbf.js"></head>

<body>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@ async function __wbg_load(module, imports) {
function __wbg_get_imports() {
const imports = {};
imports.wbg = {};
imports.wbg.__wbg_readyState_b25418fd198bf715 = function(arg0) {
const ret = getObject(arg0).readyState;
return ret;
};
imports.wbg.__wbg_send_280c8ab5d0df82de = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbg_send_1a008ea2eb3a1951 = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbg_fetch_25c13b73a41a6660 = function(arg0, arg1, arg2) {
const ret = getObject(arg0).fetch(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
Expand Down Expand Up @@ -1099,16 +1109,6 @@ function __wbg_get_imports() {
const ret = getObject(arg0).createBuffer(arg1 >>> 0, arg2 >>> 0, arg3);
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_readyState_b25418fd198bf715 = function(arg0) {
const ret = getObject(arg0).readyState;
return ret;
};
imports.wbg.__wbg_send_280c8ab5d0df82de = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).send(getStringFromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbg_send_1a008ea2eb3a1951 = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbg_close_dfa389d8fddb52fc = function() { return handleError(function (arg0) {
getObject(arg0).close();
}, arguments) };
Expand Down Expand Up @@ -1885,64 +1885,64 @@ function __wbg_get_imports() {
const ret = getObject(arg0).fullscreenElement;
return isLikeNone(ret) ? 0 : addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper3155 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_34);
imports.wbg.__wbindgen_closure_wrapper2980 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_34);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper43991 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43872 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper43995 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43876 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper43998 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43879 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper44001 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43882 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper44004 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43885 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper44007 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 199, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43888 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 117, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper44010 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper43891 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper44357 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper44238 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper45478 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper45298 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper45481 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper45301 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper45484 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_34);
imports.wbg.__wbindgen_closure_wrapper45304 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_34);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper45486 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper45306 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper49306 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_34);
imports.wbg.__wbindgen_closure_wrapper49125 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_34);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper51497 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2732, __wbg_adapter_37);
imports.wbg.__wbindgen_closure_wrapper51504 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 2654, __wbg_adapter_37);
return addHeapObject(ret);
};

Expand Down Expand Up @@ -1986,7 +1986,7 @@ async function __wbg_init(input) {
if (wasm !== undefined) return wasm;

if (typeof input === 'undefined') {
input = new URL('satrunner-248bf8019e7ac641_bg.wasm', import.meta.url);
input = new URL('satrunner-d784bdbe7b7e5cbf_bg.wasm', import.meta.url);
}
const imports = __wbg_get_imports();

Expand Down
Binary file not shown.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ fn main() {
.add_systems(Update, setup_menu.run_if(in_state(GameStage::Menu)))
.add_systems(Update, (handle_server, score_board, check_disconnected))
.add_systems(FixedUpdate, (tick, enemy_loop, handle_rain, handle_bolt))
.add_systems(Update, (input).run_if(in_state(GameStage::InGame)))
.add_systems(
Update,
(input, update_joystick).run_if(in_state(GameStage::InGame)),
FixedUpdate,
(update_joystick).run_if(in_state(GameStage::InGame)),
)
.add_systems(
Update,
Expand Down

0 comments on commit 9395155

Please sign in to comment.