From 0d71743285b8f110457205e53bdf7adb299149b7 Mon Sep 17 00:00:00 2001 From: archfan <33993466+archfan7411@users.noreply.github.com> Date: Sat, 18 Apr 2020 16:18:19 -0400 Subject: [PATCH] Make Obstacle its own scene for cleanliness --- Level.tscn | 16 +--------------- Obstacle.tscn | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 Obstacle.tscn diff --git a/Level.tscn b/Level.tscn index c02256f..d18e1f5 100644 --- a/Level.tscn +++ b/Level.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://Player.gd" type="Script" id=1] [ext_resource path="res://icon.png" type="Texture" id=2] @@ -7,8 +7,6 @@ [sub_resource type="RectangleShape2D" id=1] -[sub_resource type="RectangleShape2D" id=3] - [node name="Level" type="Node2D"] [node name="Background" type="TextureRect" parent="."] @@ -45,15 +43,3 @@ texture = ExtResource( 2 ) [node name="PlayerCollision" type="CollisionShape2D" parent="Player"] shape = SubResource( 1 ) -[node name="Obstacle" type="StaticBody2D" parent="."] -__meta__ = { -"_edit_group_": true -} - -[node name="ObstacleTexture" type="TextureRect" parent="Obstacle"] -margin_right = 40.0 -margin_bottom = 40.0 - -[node name="ObstacleCollision" type="CollisionShape2D" parent="Obstacle"] -shape = SubResource( 3 ) - diff --git a/Obstacle.tscn b/Obstacle.tscn new file mode 100644 index 0000000..47007aa --- /dev/null +++ b/Obstacle.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=2] + +[sub_resource type="RectangleShape2D" id=3] + +[node name="Obstacle" type="StaticBody2D"] +__meta__ = { +"_edit_group_": true +} + +[node name="ObstacleTexture" type="TextureRect" parent="."] +margin_right = 40.0 +margin_bottom = 40.0 + +[node name="ObstacleCollision" type="CollisionShape2D" parent="."] +shape = SubResource( 3 ) +