OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-tps_demo commits / 423efac

do
423efac5d6a6236798dd4fd421109a8cefa788d8
by Dresk Spidflisk <dreskspidflisk@gmail.com> · 2022-04-14T19:58:13.000Z

Changed files (5) +10 -7

game/maps/map_core.gd +1 -1
……@@ -29,7 +29,6 @@ func updateMapWorldEnvironmentScene():
2929 var worldEnvironment = getInstanceOfMapWorldEnvironmentScene()
3030 if(worldEnvironment != null):
3131 add_child(worldEnvironment.instance())
32 pass
3332
3433func addGrapplingHookCollisionMaskToMap():
3534 var _name = self.name
……@@ -54,4 +53,5 @@ func _on_Area_body_entered(body, map_name):
5453 if(body is KinematicBody):
5554 var mapNode = get_tree().get_current_scene().find_node(map_name, true, false)
5655 body.currentMap = mapNode
56 body.playerWantsNewWorldEnvironment = true
5757
game/maps/map_cyber/map_cyber.tscn +3 -0
……@@ -57,6 +57,7 @@ teleportation_destination = "map_test"
5757[node name="CollisionShape" type="CollisionShape" parent="Area"]
5858transform = Transform( 1000, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0 )
5959shape = SubResource( 10 )
60disabled = true
6061
6162[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."]
6263transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 38.275, 0 )
……@@ -67,4 +68,6 @@ pitch_scale = 1.36
6768autoplay = true
6869max_distance = 2000.0
6970
71[connection signal="body_entered" from="Area" to="." method="_on_Area_body_entered" binds= [ "map_cyber" ]]
72
7073[editable path="asset_map_cyber"]
game/maps/map_cyber1/map_cyber1.scn +0 -0
(no content changes — binary or rename)
game/player/player_core.gd +5 -6
……@@ -204,6 +204,11 @@ func _physics_process(_delta):
204204 respawnPlayer()
205205 return
206206
207 # Check for New World Environment
208 if(playerWantsNewWorldEnvironment):
209 playerWantsNewWorldEnvironment = false
210 currentMap.updateMapWorldEnvironmentScene()
211
207212 # Moving the character
208213 var y_cache : float = kinematicVelocity.y
209214 kinematicVelocity = kinematicVelocity.linear_interpolate(currentDirection * movementSpeed, movementAcceleration * _delta)
……@@ -294,12 +299,6 @@ func respawnPlayer():
294299 playerWantsToReleaseGrapplingHook = true
295300 $Model/Sound_Teleport_1.play()
296301 global_transform.origin = currentSpawnLocation
297
298 # Check for New World Environment
299 if(playerWantsNewWorldEnvironment):
300 playerWantsNewWorldEnvironment = false
301 currentMap.updateMapWorldEnvironmentScene()
302 # translation = ( get_tree().get_current_scene().getSpawnLocation() )# ) = currentSpawnLocation
303302
304303func playerCanJump() -> bool:
305304 if( self.is_on_floor() ):
main.tscn +1 -0
……@@ -27,6 +27,7 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 357.971, 3.8147e-06, 43.2013 )
2727[node name="Players" type="Node" parent="."]
2828
2929[node name="PlayerLocal" parent="Players" instance=ExtResource( 2 )]
30transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 69.4813, -3.05659, 181.497 )
3031
3132[node name="HyperGodot" type="Node" parent="."]
3233script = ExtResource( 6 )