This commit is contained in:
Andriy Yednarovych
2026-02-22 19:26:26 +01:00
parent fd1ff19c4c
commit e877c5f058
211 changed files with 9385 additions and 0 deletions

12
props/plants/plant.gd Normal file
View File

@@ -0,0 +1,12 @@
class_name Plant extends Node
@onready var hitbox: Hitbox = $Hitbox
func _ready() -> void:
hitbox.damaged.connect(take_damage)
func _process(_delta: float) -> void:
pass
func take_damage(_hurtbox: Hurtbox) -> void:
queue_free()

View File

@@ -0,0 +1 @@
uid://d2vgfhua60scb

44
props/plants/plant.tscn Normal file
View File

@@ -0,0 +1,44 @@
[gd_scene format=3 uid="uid://b16l2ehf7hd1t"]
[ext_resource type="Script" uid="uid://d2vgfhua60scb" path="res://props/plants/plant.gd" id="1_nxykt"]
[ext_resource type="Texture2D" uid="uid://3b5t47gfnrvn" path="res://props/sprites/Props.png" id="1_siw38"]
[ext_resource type="PackedScene" uid="uid://cda6fr5vhb4ty" path="res://general/hitbox/hitbox.tscn" id="2_nxykt"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nxykt"]
size = Vector2(29, 30)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_3p5bg"]
size = Vector2(24, 16)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_5g5lq"]
size = Vector2(24, 16)
[node name="Plant" type="Area2D" unique_id=492497178]
script = ExtResource("1_nxykt")
[node name="sprite" type="Sprite2D" parent="." unique_id=373826636]
texture = ExtResource("1_siw38")
hframes = 16
vframes = 3
[node name="Hitbox" parent="." unique_id=1876591880 instance=ExtResource("2_nxykt")]
position = Vector2(0, 9)
[node name="collision" type="CollisionShape2D" parent="Hitbox" unique_id=2005718804]
position = Vector2(-0.5, -7)
shape = SubResource("RectangleShape2D_nxykt")
debug_color = Color(0.57204384, 0.5537644, 0.1232397, 0.41960785)
[node name="collision" type="CollisionShape2D" parent="." unique_id=1955953887]
position = Vector2(0, 9)
shape = SubResource("RectangleShape2D_3p5bg")
[node name="body" type="StaticBody2D" parent="." unique_id=299359808]
collision_layer = 16
collision_mask = 0
[node name="collision" type="CollisionShape2D" parent="body" unique_id=1831304255]
position = Vector2(0, 9)
shape = SubResource("RectangleShape2D_5g5lq")
[editable path="Hitbox"]