cursor bullet projectile scene

This commit is contained in:
2025-10-04 19:31:54 +02:00
parent e043302888
commit dd0fb753ca
5 changed files with 71 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,40 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dg6dkalarcq2w"
path="res://.godot/imported/Cursor_projectile_symbol.png-ac9784c2b4b122b1bf13bdcd27ccf6fc.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Cursor_projectile_symbol.png"
dest_files=["res://.godot/imported/Cursor_projectile_symbol.png-ac9784c2b4b122b1bf13bdcd27ccf6fc.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

11
growth/cursor_bullet.gd Normal file
View File

@@ -0,0 +1,11 @@
extends Area2D
@export var speed = 70
func _physics_process(delta):
self.position += speed * delta
func _on_body_entered(body):
if body.is_in_group("mobs"):
body.take_hit()
self.queue_free()

View File

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

19
growth/cursor_bullet.tscn Normal file
View File

@@ -0,0 +1,19 @@
[gd_scene load_steps=4 format=3 uid="uid://2fmcxd2b8ff3"]
[ext_resource type="Texture2D" uid="uid://dg6dkalarcq2w" path="res://assets/Cursor_projectile_symbol.png" id="1_g08wh"]
[ext_resource type="Script" uid="uid://bmms1edsh26dp" path="res://cursor_bullet.gd" id="1_ln2dr"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_g08wh"]
size = Vector2(226, 168)
[node name="CursorBullet" type="Area2D"]
script = ExtResource("1_ln2dr")
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_g08wh")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-11, -2)
shape = SubResource("RectangleShape2D_g08wh")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]