bad guys and collectibles working
This commit is contained in:
1 parent
16cd986048
commit
aa44b13532
49 files changed
+1337
-54
No files matched your search
@@ -0,0 +1,10 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bicr20de8c3jp"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="1_l8git"]
|
||||
|
||||
[node name="AreaTrigger" type="Area2D"]
|
||||
position = Vector2(130, -94)
|
||||
script = ExtResource("1_l8git")
|
||||
metadata/_edit_group_ = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,62 @@
|
||||
[gd_scene load_steps=9 format=3 uid="uid://d0evhj5ayp0ep"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/badguy.gd" id="1_ees8e"]
|
||||
[ext_resource type="Texture2D" uid="uid://c4g3ypigewuuu" path="res://graphics/slime_green.png" id="2_le1an"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aiaao"]
|
||||
atlas = ExtResource("2_le1an")
|
||||
region = Rect2(0, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_qiek8"]
|
||||
atlas = ExtResource("2_le1an")
|
||||
region = Rect2(24, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c6suc"]
|
||||
atlas = ExtResource("2_le1an")
|
||||
region = Rect2(48, 24, 24, 24)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wxol7"]
|
||||
atlas = ExtResource("2_le1an")
|
||||
region = Rect2(72, 24, 24, 24)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_oohu0"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_aiaao")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_qiek8")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_c6suc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_wxol7")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jipcy"]
|
||||
size = Vector2(17, 14)
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_ees8e")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_oohu0")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="CastRight" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(15, 0)
|
||||
|
||||
[node name="CastLeft" type="RayCast2D" parent="."]
|
||||
target_position = Vector2(-16, 0)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-0.5, 5)
|
||||
shape = SubResource("RectangleShape2D_jipcy")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -0,0 +1,112 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://47kuhu1ukph"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://c7v2cwn2826lg" path="res://graphics/coin.png" id="1_eb1hb"]
|
||||
[ext_resource type="Script" path="res://scripts/coin.gd" id="1_q2xs3"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_j26hl"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(0, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w14lc"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(16, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ckwpx"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(32, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_6mbt7"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(48, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b2ng3"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(64, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gfrlm"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(80, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_itkyq"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(96, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_w16a2"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(112, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_kq134"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(128, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_8gvwo"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(144, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5ersa"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(160, 0, 16, 16)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gjiky"]
|
||||
atlas = ExtResource("1_eb1hb")
|
||||
region = Rect2(176, 0, 16, 16)
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_dfmiy"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_j26hl")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w14lc")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ckwpx")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_6mbt7")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_b2ng3")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gfrlm")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_itkyq")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_w16a2")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_kq134")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_8gvwo")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_5ersa")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_gjiky")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"default",
|
||||
"speed": 12.0
|
||||
}]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_h7yb5"]
|
||||
radius = 5.0
|
||||
|
||||
[node name="Area2D" type="Area2D"]
|
||||
script = ExtResource("1_q2xs3")
|
||||
|
||||
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
||||
sprite_frames = SubResource("SpriteFrames_dfmiy")
|
||||
autoplay = "default"
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("CircleShape2D_h7yb5")
|
||||
debug_color = Color(0.709804, 0.309804, 0.933333, 0.419608)
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
@@ -1,14 +1,16 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://y083suj12rld"]
|
||||
[gd_scene load_steps=19 format=3 uid="uid://y083suj12rld"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/gamecontroller.gd" id="1_77wyw"]
|
||||
[ext_resource type="PackedScene" uid="uid://go4yc8hfo1gq" path="res://scenes/character.tscn" id="2_64ccm"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwb83f7uoweuy" path="res://graphics/Terrain (32x32).png" id="2_l22q1"]
|
||||
[ext_resource type="Script" path="res://scripts/Trigger.gd" id="2_nfj1w"]
|
||||
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvd1p6xue0ub2" path="res://scenes/platform.tscn" id="6_bcgm6"]
|
||||
[ext_resource type="Texture2D" uid="uid://dly4g7fvvtamm" path="res://graphics/background/BG Image.png" id="7_gwkt6"]
|
||||
[ext_resource type="PackedScene" uid="uid://bicr20de8c3jp" path="res://scenes/area_trigger.tscn" id="7_i5ol2"]
|
||||
[ext_resource type="Texture2D" uid="uid://cw50mfjp2np08" path="res://graphics/background/Additional Sky.png" id="8_pwboq"]
|
||||
[ext_resource type="Texture2D" uid="uid://6olcj1w1svdg" path="res://graphics/background/Additional Water.png" id="9_pi0v8"]
|
||||
[ext_resource type="PackedScene" uid="uid://47kuhu1ukph" path="res://scenes/coin.tscn" id="10_mo30d"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0evhj5ayp0ep" path="res://scenes/badguy.tscn" id="11_ghgxt"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_xg6qs"]
|
||||
texture = ExtResource("2_l22q1")
|
||||
@@ -477,8 +479,8 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs")
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_xkyim"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
|
||||
radius = 60.2993
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_j8ltg"]
|
||||
radius = 23.0217
|
||||
|
||||
[sub_resource type="Animation" id="Animation_buq5q"]
|
||||
length = 0.001
|
||||
@@ -523,7 +525,7 @@ script = ExtResource("1_77wyw")
|
||||
[node name="TileMap" type="TileMap" parent="."]
|
||||
tile_set = SubResource("TileSet_47g5u")
|
||||
format = 2
|
||||
layer_0/tile_data = PackedInt32Array(262141, 262144, 2, 262142, 65536, 4, 262143, 65536, 4, 196608, 65536, 4, 196609, 65536, 4, 196610, 131072, 4, 196613, 262144, 4, 196605, 262144, 1, 131069, 262144, 1, 65534, 65536, 4, 65535, 131072, 4, 4, 131072, 2, 3, 0, 2, -65533, 0, 0, -65532, 131072, 0, 262151, 262144, 2, 196615, 262144, 0, 262153, 262144, 4, 262156, 131072, 2, 196620, 131072, 0, 196619, 0, 0, 262155, 0, 2, 7, 0, 4, 8, 65536, 4, 9, 65536, 4, 10, 1048576, 4, -65526, 983040, 3, -65525, 65536, 4, -65524, 131072, 4, 65550, 0, 4, 65551, 851968, 3, 65552, 131072, 4, 131087, 262144, 2, 65533, 983040, 3, 196630, 0, 4, 196631, 65536, 4, 196632, 131072, 4, 65559, 262144, 4)
|
||||
layer_0/tile_data = PackedInt32Array(262141, 262144, 2, 262142, 65536, 4, 262143, 65536, 4, 196608, 65536, 4, 196609, 786432, 4, 196610, 131072, 4, 196613, 262144, 4, 196605, 262144, 1, 131069, 262144, 1, 65534, 65536, 4, 65535, 131072, 4, 4, 131072, 2, 3, 0, 2, -65533, 0, 0, -65532, 131072, 0, 262151, 262144, 2, 196615, 262144, 0, 262153, 262144, 4, 262156, 131072, 2, 196620, 131072, 0, 196619, 0, 0, 262155, 0, 2, 7, 0, 4, 8, 65536, 4, 9, 65536, 4, 10, 1048576, 4, -65526, 983040, 3, -65525, 65536, 4, -65524, 131072, 4, 65550, 0, 4, 65551, 851968, 3, 65552, 131072, 4, 131087, 262144, 2, 65533, 983040, 3, 196630, 0, 4, 196631, 65536, 4, 196632, 131072, 4, 65559, 262144, 4, 131073, 262144, 0)
|
||||
|
||||
[node name="ParallaxBackground" type="ParallaxBackground" parent="."]
|
||||
|
||||
@@ -559,14 +561,12 @@ PUSH_FORCE = 550
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="CharacterBody2D"]
|
||||
|
||||
[node name="AreaTrigger" type="Area2D" parent="."]
|
||||
position = Vector2(130, -94)
|
||||
script = ExtResource("2_nfj1w")
|
||||
metadata/_edit_group_ = true
|
||||
[node name="AreaTrigger" parent="." instance=ExtResource("7_i5ol2")]
|
||||
position = Vector2(126, -57)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="AreaTrigger"]
|
||||
shape = SubResource("CircleShape2D_x8qck")
|
||||
debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608)
|
||||
shape = SubResource("CircleShape2D_j8ltg")
|
||||
debug_color = Color(0.72549, 0.309804, 0.905882, 0.419608)
|
||||
|
||||
[node name="crates" type="Node" parent="."]
|
||||
|
||||
@@ -585,5 +585,10 @@ libraries = {
|
||||
}
|
||||
autoplay = "move"
|
||||
|
||||
[node name="coin" parent="." instance=ExtResource("10_mo30d")]
|
||||
position = Vector2(79, 88)
|
||||
|
||||
[node name="Area2D" parent="." instance=ExtResource("11_ghgxt")]
|
||||
position = Vector2(-28, 84)
|
||||
|
||||
[connection signal="areatrigger" from="AreaTrigger" to="." method="_on_area_2d_areatrigger"]
|
||||
[connection signal="body_entered" from="AreaTrigger" to="AreaTrigger" method="_on_body_entered"]
|
||||
@@ -0,0 +1,8 @@
|
||||
[gd_scene format=3 uid="uid://y06dgi6yo48r"]
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
Reference in new issue
Block a user