summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/index.html2
-rw-r--r--docs/index.pckbin1940832 -> 1941152 bytes
-rw-r--r--docs/index.service.worker.js2
-rw-r--r--player.gd7
4 files changed, 8 insertions, 3 deletions
diff --git a/docs/index.html b/docs/index.html
index 6edb85b..0a80fda 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -112,7 +112,7 @@ body {
<script src="index.js"></script>
<script>
-const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1940832,"index.wasm":38034280},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"};
+const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":false,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":1941152,"index.wasm":38034280},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4,"serviceWorker":"index.service.worker.js"};
const GODOT_THREADS_ENABLED = false;
const engine = new Engine(GODOT_CONFIG);
diff --git a/docs/index.pck b/docs/index.pck
index d2833c5..c45d6a2 100644
--- a/docs/index.pck
+++ b/docs/index.pck
Binary files differ
diff --git a/docs/index.service.worker.js b/docs/index.service.worker.js
index ae553fa..2c13202 100644
--- a/docs/index.service.worker.js
+++ b/docs/index.service.worker.js
@@ -4,7 +4,7 @@
// Incrementing CACHE_VERSION will kick off the install event and force
// previously cached resources to be updated from the network.
/** @type {string} */
-const CACHE_VERSION = '1763114252|3268724986';
+const CACHE_VERSION = '1763116851|5866973052';
/** @type {string} */
const CACHE_PREFIX = 'MobileMetroidvan-sw-cache-';
const CACHE_NAME = CACHE_PREFIX + CACHE_VERSION;
diff --git a/player.gd b/player.gd
index fd5cb58..fd5465a 100644
--- a/player.gd
+++ b/player.gd
@@ -8,6 +8,7 @@ extends CharacterBody2D
var gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
var prev_dir: float = 0.0
+var jump_was_released: bool = true
# coyote = 0 indicates on floor
# coyote > 0 indicates frames since on floor
@@ -44,11 +45,15 @@ func _physics_process(delta: float):
else:
coyote += 1
- var can_jump = coyote < coyote_max
+ var can_jump = coyote < coyote_max and jump_was_released
if Input.is_action_pressed("jump") and can_jump:
velocity.y = -jump_strength
# Force coyote time to expire to forbid double jumps
coyote = coyote_max
+ jump_was_released = false
+
+ if not Input.is_action_pressed("jump"):
+ jump_was_released = true
var direction: float
if Input.is_action_pressed("move_left") and Input.is_action_pressed("move_right"):