Skip to content

Commit

Permalink
Merge pull request #30 from hyoi/for_debugging
Browse files Browse the repository at this point in the history
ステージクリア後にゲームオーバーした場合ステージのカウントを誤るバグを修正
  • Loading branch information
hyoi authored Mar 19, 2024
2 parents 615c1e9 + cfc861d commit 7cb4fe1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
8 changes: 6 additions & 2 deletions tigtag/src/play_game/detection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,19 @@ pub fn scoring_and_stage_clear
pub fn collisions_and_gameover
( qry_player: Query<&player::Player>,
qry_chaser: Query<&chasers::Chaser>,
opt_record: Option<ResMut<Record>>,
mut evt_clear: EventReader<EventClear>,
mut evt_over: EventWriter<EventOver>,
)
{ //直前の判定でクリアしていたら衝突判定しない
{ let Some ( mut record ) = opt_record else { return };

//直前の判定でクリアしていたら衝突判定しない
if evt_clear.read().next().is_some() { return }

//衝突判定が真なら
if is_collision( qry_player, qry_chaser )
{ evt_over.send( EventOver ); //後続の処理にゲームオーバーを伝える
{ *record.is_clear_mut() = false;
evt_over.send( EventOver ); //後続の処理にゲームオーバーを伝える
}
}

Expand Down
30 changes: 15 additions & 15 deletions tigtag/wasm/tigtag.js
Original file line number Diff line number Diff line change
Expand Up @@ -2065,38 +2065,34 @@ function __wbg_get_imports() {
const ret = wasm.memory;
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6718 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6719 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_34);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6719 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6720 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6720 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6721 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_40);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6723 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6724 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6725 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6726 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6727 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6728 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper6729 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper6730 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 4748, __wbg_adapter_37);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper7679 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper7680 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
return addHeapObject(ret);
Expand All @@ -2110,22 +2106,26 @@ function __wbg_get_imports() {
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper7683 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_60);
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper7684 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_60);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper7685 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper40233 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper7686 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 5275, __wbg_adapter_51);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper40234 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 29968, __wbg_adapter_67);
return addHeapObject(ret);
};
imports.wbg.__wbindgen_closure_wrapper80200 = function(arg0, arg1, arg2) {
imports.wbg.__wbindgen_closure_wrapper80201 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 58447, __wbg_adapter_70);
return addHeapObject(ret);
};
Expand Down
Binary file modified tigtag/wasm/tigtag_bg.wasm
Binary file not shown.

0 comments on commit 7cb4fe1

Please sign in to comment.