| … | … | @@ -0,0 +1,88 @@ |
| 1 | [gd_scene load_steps=26 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://TPS_controller_3.3/new_player_state_local.gd" type="Script" id=1] | |
| 4 | [ext_resource path="res://player/models/tumble_asset2.tscn" type="PackedScene" id=4] | |
| 5 | [ext_resource path="res://player/models/tumble/landing.tres" type="Animation" id=7] | |
| 6 | [ext_resource path="res://player/models/tumble/jump.tres" type="Animation" id=8] | |
| 7 | [ext_resource path="res://player/models/tumble/sprint-loop.tres" type="Animation" id=9] | |
| 8 | [ext_resource path="res://player/models/tumble/run-loop.tres" type="Animation" id=10] | |
| 9 | [ext_resource path="res://player/models/tumble/falling-loop.tres" type="Animation" id=11] | |
| 10 | [ext_resource path="res://player/models/tumble/default.tres" type="Animation" id=12] | |
| 11 | [ext_resource path="res://player/models/tumble/idle-loop.tres" type="Animation" id=13] | |
| 12 | [ext_resource path="res://player/models/tumble/dive-roll.tres" type="Animation" id=14] | |
| 13 | [ext_resource path="res://player/models/tumble/walk-diagonal-left-back-loop.tres" type="Animation" id=15] | |
| 14 | [ext_resource path="res://player/models/tumble/strafe-right-loop.tres" type="Animation" id=16] | |
| 15 | [ext_resource path="res://player/models/tumble/strafe-left-loop.tres" type="Animation" id=17] | |
| 16 | [ext_resource path="res://player/models/tumble/walk-backward-loop.tres" type="Animation" id=18] | |
| 17 | [ext_resource path="res://player/models/tumble/wall_grab_r-loop.tres" type="Animation" id=19] | |
| 18 | [ext_resource path="res://player/models/tumble/walk-diagonal-right-loop.tres" type="Animation" id=20] | |
| 19 | [ext_resource path="res://player/models/tumble/walk-diagonal-right-back-loop.tres" type="Animation" id=21] | |
| 20 | [ext_resource path="res://player/models/tumble/walk-diagonal-left-loop.tres" type="Animation" id=22] | |
| 21 | [ext_resource path="res://player/models/tumble/wall_grab_f-loop.tres" type="Animation" id=23] | |
| 22 | [ext_resource path="res://player/models/tumble/walk-forward-loop.tres" type="Animation" id=24] | |
| 23 | [ext_resource path="res://player/models/tumble/wall_grab_l-loop.tres" type="Animation" id=25] | |
| 24 | [ext_resource path="res://player/models/tumble/wall_run_r-loop.tres" type="Animation" id=26] | |
| 25 | [ext_resource path="res://player/models/tumble/wall_run_l-loop.tres" type="Animation" id=27] | |
| 26 | [ext_resource path="res://player/player_local_core.tres" type="AnimationNodeBlendTree" id=28] | |
| 27 | ||
| 28 | [sub_resource type="CylinderShape" id=1] | |
| 29 | radius = 0.3 | |
| 30 | height = 1.57511 | |
| 31 | ||
| 32 | [node name="Player" type="KinematicBody"] | |
| 33 | collision_layer = 2 | |
| 34 | script = ExtResource( 1 ) | |
| 35 | ||
| 36 | [node name="CollisionShape" type="CollisionShape" parent="."] | |
| 37 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.787508, 0 ) | |
| 38 | shape = SubResource( 1 ) | |
| 39 | ||
| 40 | [node name="Mesh" type="Spatial" parent="."] | |
| 41 | ||
| 42 | [node name="tumble" parent="Mesh" instance=ExtResource( 4 )] | |
| 43 | transform = Transform( 0.65, 0, 0, 0, 0.65, 0, 0, 0, 0.65, 0, 0, 0 ) | |
| 44 | ||
| 45 | [node name="AnimationPlayer2" type="AnimationPlayer" parent="."] | |
| 46 | root_node = NodePath("../Mesh/tumble") | |
| 47 | anims/default = ExtResource( 12 ) | |
| 48 | anims/dive-roll = ExtResource( 14 ) | |
| 49 | anims/falling-loop = ExtResource( 11 ) | |
| 50 | anims/idle-loop = ExtResource( 13 ) | |
| 51 | anims/jump = ExtResource( 8 ) | |
| 52 | anims/landing = ExtResource( 7 ) | |
| 53 | anims/run-loop = ExtResource( 10 ) | |
| 54 | anims/sprint-loop = ExtResource( 9 ) | |
| 55 | anims/strafe-left-loop = ExtResource( 17 ) | |
| 56 | anims/strafe-right-loop = ExtResource( 16 ) | |
| 57 | anims/walk-backward-loop = ExtResource( 18 ) | |
| 58 | anims/walk-diagonal-left-back-loop = ExtResource( 15 ) | |
| 59 | anims/walk-diagonal-left-loop = ExtResource( 22 ) | |
| 60 | anims/walk-diagonal-right-back-loop = ExtResource( 21 ) | |
| 61 | anims/walk-diagonal-right-loop = ExtResource( 20 ) | |
| 62 | anims/walk-forward-loop = ExtResource( 24 ) | |
| 63 | anims/wall_grab_f-loop = ExtResource( 23 ) | |
| 64 | anims/wall_grab_l-loop = ExtResource( 25 ) | |
| 65 | anims/wall_grab_r-loop = ExtResource( 19 ) | |
| 66 | anims/wall_run_l-loop = ExtResource( 27 ) | |
| 67 | anims/wall_run_r-loop = ExtResource( 26 ) | |
| 68 | ||
| 69 | [node name="AnimationTree" type="AnimationTree" parent="."] | |
| 70 | tree_root = ExtResource( 28 ) | |
| 71 | anim_player = NodePath("../AnimationPlayer2") | |
| 72 | active = true | |
| 73 | parameters/Blend2/blend_amount = 0.0 | |
| 74 | "parameters/Blend2 2/blend_amount" = 0.0 | |
| 75 | "parameters/TimeScale 3/scale" = 1.0 | |
| 76 | parameters/aim_transition/current = 0 | |
| 77 | parameters/air_blend/blend_amount = 1.0 | |
| 78 | parameters/air_transition/current = 0 | |
| 79 | parameters/falling_scale/scale = 1.0 | |
| 80 | parameters/iwr_blend/blend_amount = -1.0 | |
| 81 | parameters/jump_scale/scale = 1.0 | |
| 82 | parameters/landing_scale/scale = 1.0 | |
| 83 | parameters/roll/active = false | |
| 84 | parameters/roll_scale/scale = 1.0 | |
| 85 | parameters/run_scale/scale = 1.0 | |
| 86 | parameters/strafe/blend_position = Vector2( 0.0673628, 1.37838 ) | |
| 87 | parameters/walk_scale/scale = 1.0 | |
| 88 | parameters/wall_run/current = 2 |
| … | … | @@ -1,5 +1,3 @@ |
| 1 | [gd_scene load_steps=2 format=2] | |
| 1 | [gd_scene format=2] | |
| 2 | 2 | |
| 3 | [ext_resource path="res://TPS_controller_3.3/TPS_core_player.tscn" type="PackedScene" id=1] | |
| 4 | ||
| 5 | [node name="Player" instance=ExtResource( 1 )] | |
| 3 | [node name="Player"] |
| … | … | @@ -9,9 +9,6 @@ bg_color = Color( 0, 0, 0, 0.470588 ) |
| 9 | 9 | anchor_right = 1.0 |
| 10 | 10 | anchor_bottom = 1.0 |
| 11 | 11 | script = ExtResource( 1 ) |
| 12 | __meta__ = { | |
| 13 | "_edit_use_anchors_": false | |
| 14 | } | |
| 15 | 12 | |
| 16 | 13 | [node name="Panel" type="Panel" parent="."] |
| 17 | 14 | margin_left = 10.0 |
| … | … | @@ -194,7 +194,7 @@ func _checkPlayerCanJump(newBody : PhysicsBody, addedBody : bool) -> void: |
| 194 | 194 | func _on_Player_body_entered(body : Node) -> void: |
| 195 | 195 | if(!collisions.has(body.get_instance_id()) ): |
| 196 | 196 | collisions[body.get_instance_id()] = body.name |
| 197 | $CollisionUI.onNewCollision(body, collisions) | |
| 197 | $CollisionUI.onNewollision(body, collisions) | |
| 198 | 198 | |
| 199 | 199 | |
| 200 | 200 | func _on_Player_body_exited(body : Node) -> void: |
| … | … | @@ -1,10 +1,8 @@ |
| 1 | 1 | extends Node |
| 2 | 2 | |
| 3 | onready var hyperGateway : HyperGateway = $HyperGodot/HyperGateway | |
| 4 | onready var gossip : HyperGossip = $HyperGodot/HyperGossip | |
| 5 | onready var gossip_event_timer : Timer = $HyperGodot/GossipEventTimer | |
| 6 | ||
| 7 | onready var player_local : KinematicBody = $Players/PlayerLocal | |
| 3 | onready var hyperGateway : HyperGateway | |
| 4 | onready var hyperGossip : HyperGossip | |
| 5 | onready var player_local : KinematicBody | |
| 8 | 6 | |
| 9 | 7 | const knownPlayers = {} |
| 10 | 8 | |
| … | … | @@ -17,9 +15,11 @@ var RemotePlayer = preload("res://TPS_controller_3.3/TPS_new_remote_player.tscn" |
| 17 | 15 | |
| 18 | 16 | func _ready(): |
| 19 | 17 | if !hyperGateway: |
| 20 | hyperGateway = $HyperGodot/HyperGateway | |
| 18 | hyperGateway = get_node("../HyperGodot/HyperGateway") | |
| 21 | 19 | if !player_local: |
| 22 | player_local = $Players/PlayerLocal | |
| 20 | player_local = get_node("../Players/PlayerLocal") | |
| 21 | if !hyperGossip: | |
| 22 | hyperGossip = get_node("../HyperGodot/HyperGossip") | |
| 23 | 23 | |
| 24 | 24 | func _on_GossipEventTimer_timeout(): |
| 25 | 25 | if hyperGateway.getIsGatewayRunning(): |
| … | … | @@ -36,8 +36,6 @@ func get_player_object(id): |
| 36 | 36 | |
| 37 | 37 | var remotePlayer = RemotePlayer.instance() |
| 38 | 38 | knownPlayers[id] = remotePlayer |
| 39 | ||
| 40 | emit_signal("new_player") | |
| 41 | 39 | |
| 42 | 40 | add_child(remotePlayer) |
| 43 | 41 | _broadcast_player_snapshot() |
| … | … | @@ -63,7 +61,7 @@ func _broadcast_player_snapshot(): |
| 63 | 61 | } |
| 64 | 62 | } |
| 65 | 63 | # print('Broadcasting', data) |
| 66 | gossip.broadcast_event(EVENT_PLAYER_SNAPSHOT, data) | |
| 64 | hyperGossip.broadcast_event(EVENT_PLAYER_SNAPSHOT, data) | |
| 67 | 65 | |
| 68 | 66 | func on_remote_player_snapshot(positionData, id): |
| 69 | 67 | var remotePlayer = get_player_object(id) |
| … | … | @@ -187,4 +187,4 @@ nodes/walk_scale/node = SubResource( 23 ) |
| 187 | 187 | nodes/walk_scale/position = Vector2( -640, 360 ) |
| 188 | 188 | nodes/wall_run/node = SubResource( 50 ) |
| 189 | 189 | nodes/wall_run/position = Vector2( 720, -60 ) |
| 190 | node_connections = [ "output", 0, "wall_run", "falling_scale", 0, "Animation 6", "TimeScale 3", 0, "strafe", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "run_scale", 0, "Animation 4", "landing_scale", 0, "Animation 7", "roll_scale", 0, "Animation", "jump_scale", 0, "jump", "walk_scale", 0, "Animation 3", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "roll", 0, "air_transition", "roll", 1, "roll_scale" ] | |
| 190 | node_connections = [ "output", 0, "wall_run", "wall_run", 0, "Blend2", "wall_run", 1, "Blend2 2", "wall_run", 2, "roll", "TimeScale 3", 0, "strafe", "roll_scale", 0, "Animation", "Blend2", 0, "Animation 8", "Blend2", 1, "Animation 9", "air_blend", 0, "jump_scale", "air_blend", 1, "falling_scale", "air_blend", 2, "landing_scale", "air_transition", 0, "air_blend", "air_transition", 1, "aim_transition", "aim_transition", 0, "TimeScale 3", "aim_transition", 1, "iwr_blend", "falling_scale", 0, "Animation 6", "iwr_blend", 0, "Animation 2", "iwr_blend", 1, "walk_scale", "iwr_blend", 2, "run_scale", "landing_scale", 0, "Animation 7", "Blend2 2", 0, "Animation 11", "Blend2 2", 1, "Animation 10", "walk_scale", 0, "Animation 3", "roll", 0, "air_transition", "roll", 1, "roll_scale", "jump_scale", 0, "jump", "run_scale", 0, "Animation 4" ] |