Compare commits

...

2 Commits

Author SHA1 Message Date
Artur David 708bb5e763 Merge branch 'main' of https://gitty.informatik.hs-mannheim.de/3002102/gae_wild_jam 2026-04-14 14:54:46 +02:00
Artur David 99b1e8069d added grapes 2026-04-14 14:53:58 +02:00
3 changed files with 28 additions and 10 deletions

View File

@ -3,14 +3,14 @@
[ext_resource type="Script" uid="uid://bm4wewhu4hpte" path="res://scripts/blue_slime.gd" id="1_ds7cs"]
[ext_resource type="Texture2D" uid="uid://dx1ipffjtn8we" path="res://assets/Slime2/With_shadow/Slime2_Death_with_shadow.png" id="2_7qf5q"]
[ext_resource type="Script" uid="uid://cjkaw7wqw4e30" path="res://scripts/drop_table.gd" id="2_ullxd"]
[ext_resource type="PackedScene" uid="uid://dm6d2jg52vi41" path="res://scenes/apple.tscn" id="3_vx4o0"]
[ext_resource type="PackedScene" uid="uid://cob0yjs7tx2ol" path="res://scenes/grape.tscn" id="3_ullxd"]
[ext_resource type="Texture2D" uid="uid://bn44pxk3l7j1c" path="res://assets/Slime2/With_shadow/Slime2_Idle_with_shadow.png" id="3_xfb3o"]
[ext_resource type="Texture2D" uid="uid://buquy2xkbq7cj" path="res://assets/Slime2/With_shadow/Slime2_Hurt_with_shadow.png" id="4_7qf5q"]
[ext_resource type="Texture2D" uid="uid://b33awo7oiotwo" path="res://assets/Slime2/With_shadow/Slime2_Walk_with_shadow.png" id="4_ullxd"]
[sub_resource type="Resource" id="Resource_i8e30"]
script = ExtResource("2_ullxd")
drop = ExtResource("3_vx4o0")
drop = ExtResource("3_ullxd")
chance = 0.3
metadata/_custom_type_script = "uid://cjkaw7wqw4e30"

18
scenes/grape.tscn 100644
View File

@ -0,0 +1,18 @@
[gd_scene format=3 uid="uid://cob0yjs7tx2ol"]
[ext_resource type="Texture2D" uid="uid://d2pinnrigixnp" path="res://assets/16x16 Pixelart Food Icons/Pixel_Foods(ARTLİNE).png" id="1_8daar"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0gvam"]
atlas = ExtResource("1_8daar")
region = Rect2(55, 19, 15, 16)
[sub_resource type="CircleShape2D" id="CircleShape2D_cukkh"]
[node name="Grape" type="Area2D" unique_id=994786367]
[node name="Sprite2D" type="Sprite2D" parent="." unique_id=2069064426]
texture_filter = 1
texture = SubResource("AtlasTexture_0gvam")
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1030759335]
shape = SubResource("CircleShape2D_cukkh")

View File

@ -4,13 +4,13 @@ var enemies_hit = 0
func _ready() -> void:
speed = 500
super()
var first = get_nearest_enemy(global_position)
if first == null:
queue_free()
return
launch(first.global_position)
speed = 500
super()
var first = get_nearest_enemy(global_position)
if first == null:
queue_free()
return
launch(first.global_position)
func _on_body_entered(body: Node2D) -> void:
if body.is_in_group("enemies") and not body.is_hurt and not body.is_dying: