Fixed crate trap with groups

This commit is contained in:
Winnie Kwan committed 2024-08-14 21:21:00 -04:00
1 parent 4e2bdbae01
commit f4f7a8513f
20 files changed
+80 -119

No files matched your search

+1 -1
View File
@@ -249,7 +249,7 @@ animations = [{
[sub_resource type="CircleShape2D" id="CircleShape2D_ubfw4"]
radius = 13.0384
[node name="CharacterBody2D" type="CharacterBody2D"]
[node name="CharacterBody2D" type="CharacterBody2D" groups=["player", "sprite"]]
position = Vector2(-1, 0)
script = ExtResource("1_ymy68")
JUMP_VELOCITY = -500.0
+2 -48
View File
@@ -1,14 +1,13 @@
[gd_scene load_steps=19 format=3 uid="uid://y083suj12rld"]
[gd_scene load_steps=15 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="Script" path="res://scripts/trigger.gd" id="2_nfj1w"]
[ext_resource type="Texture2D" uid="uid://doodiicuxeb53" path="res://graphics/background/BG Image.png" id="3_1agog"]
[ext_resource type="Texture2D" uid="uid://ry5bkalocmx5" path="res://graphics/background/Additional Sky.png" id="4_g10bt"]
[ext_resource type="Texture2D" uid="uid://cl2dnusewe0ch" path="res://graphics/background/Additional Water.png" id="5_ax33h"]
[ext_resource type="PackedScene" uid="uid://ukuu7p7vhlq" path="res://scenes/crate.tscn" id="5_u8rgi"]
[ext_resource type="PackedScene" uid="uid://c5w3e6gjovcvk" path="res://scenes/platform.tscn" id="6_0ewk8"]
[ext_resource type="PackedScene" uid="uid://5vkisovypn7u" path="res://scenes/coin.tscn" id="10_vh708"]
[ext_resource type="PackedScene" uid="uid://b07px1qf5obql" path="res://scenes/slimeEnemy.tscn" id="11_gnd6o"]
@@ -487,43 +486,6 @@ sources/0 = SubResource("TileSetAtlasSource_xg6qs")
[sub_resource type="CircleShape2D" id="CircleShape2D_x8qck"]
radius = 60.2993
[sub_resource type="Animation" id="Animation_spruu"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_qecmg"]
resource_name = "move"
loop_mode = 2
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(100, 0)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_3nvvt"]
_data = {
"RESET": SubResource("Animation_spruu"),
"move": SubResource("Animation_qecmg")
}
[node name="Game" type="Node2D"]
[node name="GameController" type="Node" parent="."]
@@ -585,14 +547,6 @@ debug_color = Color(0.556863, 0.415686, 0.964706, 0.419608)
[node name="crate1" parent="crates" instance=ExtResource("5_u8rgi")]
position = Vector2(114, 30)
[node name="Platform" parent="." instance=ExtResource("6_0ewk8")]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Platform"]
libraries = {
"": SubResource("AnimationLibrary_3nvvt")
}
autoplay = "move"
[node name="BoxTrap" type="Node2D" parent="."]
position = Vector2(273, -87)
+1 -1
View File
@@ -42,7 +42,7 @@ animations = [{
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5m2pq"]
size = Vector2(14, 15)
[node name="SlimeEnemy" type="Area2D"]
[node name="SlimeEnemy" type="Area2D" groups=["sprite"]]
script = ExtResource("1_c0t6u")
metadata/_edit_group_ = true