OverviewFilesCommitsIssuesDocsReleasesPeers

godot-tumble_player_demo commits / 34c0148

d
34c0148f5235b3943b64367588319aee3059f305
by Dresk Spidflisk <dreskspidflisk@gmail.com> · 2022-03-17T00:28:34.000Z

Changed files (3) +15 -5

levels/level_script.gd +13 -4
……@@ -3,6 +3,7 @@ extends Node
33onready var hyperGateway : HyperGateway
44onready var hyperGossip : HyperGossip
55onready var player_local : KinematicBody
6onready var snapshotTimer : Timer
67
78const knownPlayers = {}
89
……@@ -20,10 +21,8 @@ func _ready():
2021 player_local = get_node("../Players/PlayerLocal")
2122 if !hyperGossip:
2223 hyperGossip = get_node("../HyperGodot/HyperGossip")
23
24func _on_GossipEventTimer_timeout():
25 if hyperGateway.getIsGatewayRunning():
26 _broadcast_player_snapshot()
24 if !snapshotTimer:
25 snapshotTimer = get_node("../HyperGodot/GossipEventTimer")
2726
2827func _on_HyperGossip_event(type, data, from):
2928 if type == EVENT_PLAYER_SNAPSHOT:
……@@ -79,3 +78,13 @@ func on_remote_player_move(directionData, id):
7978
8079func _on_HyperGossip_listening(extension_name):
8180 _broadcast_player_snapshot()
81
82
83func _on_GossipEventTimer_timeout():
84 if hyperGateway.getIsGatewayRunning():
85 _broadcast_player_snapshot()
86
87
88func _on_HyperDebugUI_gossip_update_rate_changed(seconds : float):
89 gossip_event_timer.wait_time = seconds
90 gossip_event_timer.start(seconds)
main.tscn +1 -0
……@@ -57,3 +57,4 @@ shape = SubResource( 3 )
5757[connection signal="event" from="HyperGodot/HyperGossip" to="HyperGodot" method="_on_HyperGossip_event"]
5858[connection signal="listening" from="HyperGodot/HyperGossip" to="level_test" method="_on_HyperGossip_listening"]
5959[connection signal="timeout" from="HyperGodot/GossipEventTimer" to="level_test" method="_on_GossipEventTimer_timeout"]
60[connection signal="gossip_update_rate_changed" from="HyperGodot/HyperDebugUI" to="level_test" method="_on_HyperDebugUI_gossip_update_rate_changed"]
player/player_local_core.tres +1 -1
……@@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 )
187187nodes/walk_scale/position = Vector2( -640, 360 )
188188nodes/wall_run/node = SubResource( 50 )
189189nodes/wall_run/position = Vector2( 720, -60 )
190node_connections = [ "output", 0, "wall_run", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "jump_scale", 0, "jump", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "roll_scale", 0, "Animation", "roll", 0, "air_transition", "roll", 1, "roll_scale", "walk_scale", 0, "Animation 3", "run_scale", 0, "Animation 4", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "falling_scale", 0, "Animation 6", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "TimeScale 3", 0, "strafe", "landing_scale", 0, "Animation 7" ]
190node_connections = [ "output", 0, "wall_run", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "jump_scale", 0, "jump", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "falling_scale", 0, "Animation 6", "roll_scale", 0, "Animation", "landing_scale", 0, "Animation 7", "walk_scale", 0, "Animation 3", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "TimeScale 3", 0, "strafe", "roll", 0, "air_transition", "roll", 1, "roll_scale", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "run_scale", 0, "Animation 4" ]