init
This commit is contained in:
12
props/plants/plant.gd
Normal file
12
props/plants/plant.gd
Normal 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()
|
||||
1
props/plants/plant.gd.uid
Normal file
1
props/plants/plant.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://d2vgfhua60scb
|
||||
44
props/plants/plant.tscn
Normal file
44
props/plants/plant.tscn
Normal 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"]
|
||||
BIN
props/sprites/Props.png
Normal file
BIN
props/sprites/Props.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
40
props/sprites/Props.png.import
Normal file
40
props/sprites/Props.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://3b5t47gfnrvn"
|
||||
path="res://.godot/imported/Props.png-e75f45c2aed4f78c9dea08e5eba74a96.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://props/sprites/Props.png"
|
||||
dest_files=["res://.godot/imported/Props.png-e75f45c2aed4f78c9dea08e5eba74a96.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
Reference in New Issue
Block a user