| … | … | @@ -0,0 +1,18 @@ |
| 1 | [gd_scene load_steps=3 format=2] | |
| 2 | ||
| 3 | [ext_resource path="res://levels/scenes/portal.gd" type="Script" id=1] | |
| 4 | ||
| 5 | [sub_resource type="BoxShape" id=1] | |
| 6 | ||
| 7 | [node name="Portal" type="Spatial"] | |
| 8 | transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1.178, 1.877, -3.673 ) | |
| 9 | script = ExtResource( 1 ) | |
| 10 | portal_destination = "tumble.pck" | |
| 11 | ||
| 12 | [node name="Hitbox" type="Area" parent="."] | |
| 13 | ||
| 14 | [node name="CollisionShape" type="CollisionShape" parent="Hitbox"] | |
| 15 | transform = Transform( 0.707107, 0, 0.707107, 0, 1, 0, -0.707107, 0, 0.707107, 2.72286, -8.67153, 19.502 ) | |
| 16 | shape = SubResource( 1 ) | |
| 17 | ||
| 18 | [connection signal="body_shape_entered" from="Hitbox" to="." method="_on_Hitbox_body_shape_entered"] |
| … | … | @@ -1,4 +1,4 @@ |
| 1 | [gd_scene load_steps=16 format=2] | |
| 1 | [gd_scene load_steps=17 format=2] | |
| 2 | 2 | |
| 3 | 3 | [ext_resource path="res://assets/levels/level0/assets_level_0.tscn" type="PackedScene" id=1] |
| 4 | 4 | [ext_resource path="res://levels/spawn_point/spawn_point.tscn" type="PackedScene" id=2] |
| … | … | @@ -15,6 +15,7 @@ |
| 15 | 15 | [ext_resource path="res://ui/PlayerConfig.tscn" type="PackedScene" id=13] |
| 16 | 16 | [ext_resource path="res://menu/main/menu_main.scn" type="PackedScene" id=14] |
| 17 | 17 | [ext_resource path="res://player/ball/player_ball_controller.gd" type="Script" id=15] |
| 18 | [ext_resource path="res://levels/portal/Portal.tscn" type="PackedScene" id=16] | |
| 18 | 19 | |
| 19 | 20 | [node name="Spatial" type="Node"] |
| 20 | 21 | script = ExtResource( 3 ) |
| … | … | @@ -66,6 +67,8 @@ visible = false |
| 66 | 67 | [node name="CameraTween" type="Tween" parent="."] |
| 67 | 68 | pause_mode = 2 |
| 68 | 69 | |
| 70 | [node name="Portal" parent="." instance=ExtResource( 16 )] | |
| 71 | ||
| 69 | 72 | [node name="HyperGodot" type="Node" parent="."] |
| 70 | 73 | |
| 71 | 74 | [node name="HyperGateway" type="Node" parent="HyperGodot"] |
| … | … | @@ -84,3 +87,5 @@ autostart = true |
| 84 | 87 | [connection signal="event" from="HyperGodot/HyperGossip" to="." method="_on_HyperGossip_event"] |
| 85 | 88 | [connection signal="listening" from="HyperGodot/HyperGossip" to="." method="_on_HyperGossip_listening"] |
| 86 | 89 | [connection signal="timeout" from="HyperGodot/GossipEventTimer" to="." method="_on_GossipEventTimer_timeout"] |
| 90 | ||
| 91 | [editable path="Portal"] |
| … | … | @@ -0,0 +1,19 @@ |
| 1 | extends Spatial | |
| 2 | ||
| 3 | export var portal_destination : String = "" | |
| 4 | ||
| 5 | # Called when the node enters the scene tree for the first time. | |
| 6 | func _ready(): | |
| 7 | pass # Replace with function body. | |
| 8 | ||
| 9 | func tryGameChange(gameChangeName : String, sendGossip : bool, playerNode): | |
| 10 | OS.execute(OS.get_executable_path(), ["--main-pack", portal_destination], false) | |
| 11 | get_tree().quit() | |
| 12 | ||
| 13 | func _on_CollisionShape_gameplay_entered(): | |
| 14 | pass # Replace with function body. | |
| 15 | ||
| 16 | func _on_Hitbox_body_shape_entered(body_rid, body, body_shape_index, local_shape_index): | |
| 17 | if(body is RigidBody): | |
| 18 | tryGameChange(portal_destination, true, body) | |
| 19 | #print("blah") |