From d8765e25f185fc64ed581100aea30f556f49613b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 3 Oct 2020 03:20:01 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9D=87=EF=B8=8F=20Add=20very=20simple=20Play?= =?UTF-8?q?er=20scene?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scenes/Main.tscn | 10 +++++++--- Scenes/Player.tscn | 16 ++++++++++++++++ project.godot | 8 +++++++- 3 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 Scenes/Player.tscn diff --git a/Scenes/Main.tscn b/Scenes/Main.tscn index 7a89188..84f12eb 100644 --- a/Scenes/Main.tscn +++ b/Scenes/Main.tscn @@ -1,8 +1,12 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=2] -[ext_resource path="res://Scenes/Conductor.tscn" type="PackedScene" id=1] +[ext_resource path="res://Scenes/Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://Scenes/Conductor.tscn" type="PackedScene" id=2] [node name="Main" type="Node2D"] -[node name="Conductor" parent="." instance=ExtResource( 1 )] +[node name="Conductor" parent="." instance=ExtResource( 2 )] song_offset = 200000.0 + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 293.919, 200.506 ) diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn new file mode 100644 index 0000000..40592bc --- /dev/null +++ b/Scenes/Player.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://Sprites/placeholder_cat.jpg" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 22.5, 22.5 ) + +[node name="Player" type="KinematicBody2D"] +collision_layer = 2 + +[node name="Sprite" type="Sprite" parent="."] +scale = Vector2( 0.25, 0.25 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) diff --git a/project.godot b/project.godot index 69ecfff..381b11b 100644 --- a/project.godot +++ b/project.godot @@ -21,7 +21,13 @@ _global_script_class_icons={ [application] config/name="ld47" -run/main_scene="res://Main.tscn" +run/main_scene="res://Scenes/Main.tscn" + +[layer_names] + +2d_render/layer_1="Default" +2d_physics/layer_1="Default" +2d_physics/layer_2="Player" [rendering]