Skip to content

Commit

Permalink
add win lose
Browse files Browse the repository at this point in the history
  • Loading branch information
kai63001 committed Mar 11, 2022
1 parent c3b3260 commit 008047a
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion godot/Demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<script type='text/javascript' src='index.js'></script>
<script type='text/javascript'>//<![CDATA[

const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":3499408,"index.wasm":17472981},"focusCanvas":true,"gdnativeLibs":[]};
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":3499392,"index.wasm":17472981},"focusCanvas":true,"gdnativeLibs":[]};
var engine = new Engine(GODOT_CONFIG);

(function() {
Expand Down
Binary file modified godot/Demo/index.pck
Binary file not shown.
1 change: 1 addition & 0 deletions godot/Script/Item/BoxItem.gd
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ func _on_TextureButton_pressed():
node._clearRandomBox();
node.myPoint = num;
var server = get_node("/root/Main/ServerConnect")
print("num :",num)
server._sendStateData(0,String(num))

4 changes: 1 addition & 3 deletions godot/Script/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,4 @@ func _on_request_completed(result, response_code, headers, body):
$LoadingNFT.queue_free()

func showUI():
var ui_res = load("res://Screen/UI.tscn")
var ui_in = ui_res.instance()
add_child(ui_in)
get_tree(). reload_current_scene()
2 changes: 2 additions & 0 deletions godot/Script/ServerConnect.gd
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func _on_matchmaker_matched(p_matched : NakamaRTAPI.MatchmakerMatched):
return
print("Joined match: %s" % [joined_match])
match_id = joined_match.match_id
print(match_id)
# Remove the UI
var UI = get_parent().get_node("UI")
UI.queue_free()
Expand Down Expand Up @@ -93,3 +94,4 @@ func _sendStateData(code,data):
func _leaveMath():
yield(socket.leave_match_async(match_id), "completed")
match_id = "";
matchmaker_ticket = null;

1 comment on commit 008047a

@kai63001
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.