Skip to content

Commit 31b31c0

Browse files
committed
game-06: Add basic world
1 parent fc3da3b commit 31b31c0

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

game-06/main.tscn

+26-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
[gd_scene load_steps=4 format=3 uid="uid://ci147qf6s6jhg"]
1+
[gd_scene load_steps=7 format=3 uid="uid://ci147qf6s6jhg"]
22

33
[ext_resource type="Texture2D" uid="uid://2lkjiw4cpjo1" path="res://game-06/graphics/ship.png" id="1_be160"]
44
[ext_resource type="Texture2D" uid="uid://c2kmueth1qo3q" path="res://game-06/graphics/coin.png" id="2_bcxue"]
5+
[ext_resource type="Script" path="res://addons/block_code/simple_nodes/simple_character/simple_character.gd" id="3_7g8jp"]
56
[ext_resource type="Texture2D" uid="uid://sfab1iwfjhyc" path="res://game-06/graphics/obstacle.png" id="3_w1gab"]
67

7-
[node name="Main" type="Node2D"]
8+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_s7voe"]
9+
size = Vector2(960, 20)
810

9-
[node name="Ship" type="Sprite2D" parent="."]
10-
position = Vector2(157, 236)
11-
scale = Vector2(0.197971, 0.197971)
12-
texture = ExtResource("1_be160")
11+
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m1jur"]
12+
size = Vector2(960, 20)
13+
14+
[node name="Main" type="Node2D"]
1315

1416
[node name="Coin" type="Sprite2D" parent="."]
1517
position = Vector2(413.597, 305.681)
@@ -20,3 +22,21 @@ texture = ExtResource("2_bcxue")
2022
position = Vector2(563.597, 220.681)
2123
scale = Vector2(0.515775, 0.515775)
2224
texture = ExtResource("3_w1gab")
25+
26+
[node name="SimpleCharacter" type="CharacterBody2D" parent="." groups=["affected_by_gravity"]]
27+
position = Vector2(157, 236)
28+
script = ExtResource("3_7g8jp")
29+
30+
[node name="Ship" type="Sprite2D" parent="SimpleCharacter"]
31+
scale = Vector2(0.197971, 0.197971)
32+
texture = ExtResource("1_be160")
33+
34+
[node name="Walls" type="StaticBody2D" parent="."]
35+
36+
[node name="CollisionShape2D" type="CollisionShape2D" parent="Walls"]
37+
position = Vector2(480, 0)
38+
shape = SubResource("RectangleShape2D_s7voe")
39+
40+
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Walls"]
41+
position = Vector2(480, 544)
42+
shape = SubResource("RectangleShape2D_m1jur")

0 commit comments

Comments
 (0)