mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 15:44:23 +00:00
Again, remove Draggable
from Imp
This commit is contained in:
parent
3b761f2611
commit
c20eb76fb9
2 changed files with 7 additions and 11 deletions
|
@ -5,7 +5,6 @@ class_name Imp
|
|||
|
||||
@onready var skull_spawner: Spawner = $"SkullSpawner"
|
||||
@onready var sprite: SpriteLeftRight = $"Sprite"
|
||||
@onready var draggable: Draggable = $"Draggable"
|
||||
|
||||
|
||||
func _on_eat_target_eaten(target: Edible):
|
||||
|
@ -13,13 +12,6 @@ func _on_eat_target_eaten(target: Edible):
|
|||
if Random.rng.randf() < skull_chance:
|
||||
skull_spawner.spawn()
|
||||
|
||||
|
||||
func _on_draggable_move(movement:Vector2):
|
||||
if draggable.being_dragged:
|
||||
move_and_collide(movement)
|
||||
sprite.handle_move(movement)
|
||||
|
||||
func _on_move(movement:Vector2):
|
||||
if not draggable.being_dragged:
|
||||
move_and_collide(movement)
|
||||
sprite.handle_move(movement)
|
||||
move_and_collide(movement)
|
||||
sprite.handle_move(movement)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=9 format=3 uid="uid://cxj5aud02f40j"]
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cxj5aud02f40j"]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/game/main_game.gd" id="1_wiglu"]
|
||||
[ext_resource type="PackedScene" uid="uid://dm068vaseh45n" path="res://scenes/game/game_camera.tscn" id="2_db5xs"]
|
||||
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://brvbtvt4em32" path="res://behaviours/counter.tscn" id="3_p6jw3"]
|
||||
[ext_resource type="PackedScene" uid="uid://col1q3elvkfwk" path="res://scenes/game/cursor.tscn" id="5_g504x"]
|
||||
[ext_resource type="PackedScene" uid="uid://bc2bm8lbol18w" path="res://entities/sheep.tscn" id="6_j2kdp"]
|
||||
[ext_resource type="PackedScene" uid="uid://4d3ksr3171x4" path="res://entities/imp.tscn" id="7_7od2n"]
|
||||
|
||||
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_058kb"]
|
||||
texture = ExtResource("2_o7bg5")
|
||||
|
@ -842,3 +843,6 @@ position = Vector2(307, -33)
|
|||
|
||||
[node name="Sheep5" parent="." instance=ExtResource("6_j2kdp")]
|
||||
position = Vector2(182, -217)
|
||||
|
||||
[node name="Imp" parent="." instance=ExtResource("7_7od2n")]
|
||||
position = Vector2(-65, -233)
|
||||
|
|
Loading…
Reference in a new issue