Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ステージクリア後にゲームオーバーした場合ステージのカウントを誤るバグを修正 #30

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.