From fa02896e8d8eeedb3e807609c88425bb4eea6b83 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Fri, 9 Aug 2024 17:06:35 +0800 Subject: [PATCH] :sparkles: World border --- Scenes/Player.tscn | 3 +-- Scenes/Root.tscn | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn index 45bf686..b7b7727 100644 --- a/Scenes/Player.tscn +++ b/Scenes/Player.tscn @@ -104,8 +104,7 @@ rotation_smoothing_enabled = true script = ExtResource("4_fwngj") Noise = SubResource("FastNoiseLite_cfnx7") -[node name="OffScreenMarker" parent="." node_paths=PackedStringArray("Tracking") instance=ExtResource("7_juwvx")] -Tracking = NodePath("..") +[node name="OffScreenMarker" parent="." instance=ExtResource("7_juwvx")] [node name="ReloadTimer" type="Timer" parent="."] wait_time = 6.0 diff --git a/Scenes/Root.tscn b/Scenes/Root.tscn index bd8f61c..8c5f005 100644 --- a/Scenes/Root.tscn +++ b/Scenes/Root.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://bjhmjrldq4lkt"] +[gd_scene load_steps=15 format=3 uid="uid://bjhmjrldq4lkt"] [ext_resource type="PackedScene" uid="uid://b3gx0bl43lku3" path="res://Scenes/Player.tscn" id="1_vby0g"] [ext_resource type="PackedScene" uid="uid://dk8x2aeq1eevf" path="res://Scenes/UI/BootScreen.tscn" id="2_7aede"] @@ -12,6 +12,12 @@ [ext_resource type="PackedScene" uid="uid://c7w5sgq0bshk0" path="res://Scenes/UI/HUD.tscn" id="5_qvun1"] [ext_resource type="PackedScene" uid="uid://dfoy57v3q4of5" path="res://Scenes/UI/Leaderboard.tscn" id="7_j24m7"] +[sub_resource type="RectangleShape2D" id="RectangleShape2D_48orl"] +size = Vector2(5000, 8) + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_o3bru"] +size = Vector2(8, 5000) + [sub_resource type="SceneReplicationConfig" id="SceneReplicationConfig_gyspy"] properties/0/path = NodePath(".:RoundProgress") properties/0/spawn = true @@ -25,6 +31,24 @@ properties/2/replication_mode = 1 [node name="Node" type="Node"] +[node name="WorldBorder" type="StaticBody2D" parent="."] + +[node name="Top" type="CollisionShape2D" parent="WorldBorder"] +position = Vector2(2.08165e-12, -2500) +shape = SubResource("RectangleShape2D_48orl") + +[node name="Bottom" type="CollisionShape2D" parent="WorldBorder"] +position = Vector2(2.08165e-12, 2500) +shape = SubResource("RectangleShape2D_48orl") + +[node name="Left" type="CollisionShape2D" parent="WorldBorder"] +position = Vector2(2500, 2.08165e-12) +shape = SubResource("RectangleShape2D_o3bru") + +[node name="Right" type="CollisionShape2D" parent="WorldBorder"] +position = Vector2(-2500, 2.08165e-12) +shape = SubResource("RectangleShape2D_o3bru") + [node name="LaunchScreen" parent="." node_paths=PackedStringArray("Launcher") instance=ExtResource("2_7o53i")] theme = ExtResource("2_w3ynu") Launcher = NodePath("../LauncherNode") @@ -70,6 +94,7 @@ World = NodePath("../../World") script = ExtResource("3_xwguj") Scoreboard = NodePath("../ScoreboardNode") PlayerScene = ExtResource("1_vby0g") +RoundDuration = 180.0 [node name="MultiplayerSynchronizer" type="MultiplayerSynchronizer" parent="."] root_path = NodePath("../World")