Added Map; Added Spawners; Changed Decorations; Cleaned up Code and some Settings; Added Enemy
This commit is contained in:
parent
e82438139f
commit
e18beb6c4c
160 changed files with 4674 additions and 182 deletions
|
|
@ -2,12 +2,28 @@ extends Area2D
|
|||
|
||||
@export_range(10,1000) var value = 10
|
||||
@export_range(1,70) var weight = 1
|
||||
@onready var interactIcon = $InteractIcon
|
||||
|
||||
const heavy = 50
|
||||
|
||||
var player = null
|
||||
|
||||
func _ready() -> void:
|
||||
interactIcon.hide()
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
for i in get_overlapping_areas():
|
||||
if i.is_in_group("Player"):
|
||||
if isCarryied():
|
||||
interactIcon.hide()
|
||||
elif not isCarryied():
|
||||
interactIcon.show()
|
||||
|
||||
#if isCarryied():
|
||||
#interactIcon.hide()
|
||||
#elif not isCarryied():
|
||||
#interactIcon.show()
|
||||
|
||||
if player != null:
|
||||
global_position.y = move_toward(global_position.y, player.global_position.y, 3)
|
||||
global_position.x = move_toward(global_position.x, player.global_position.x, 3)
|
||||
|
|
@ -29,3 +45,14 @@ func getValue():
|
|||
|
||||
func isCarryied():
|
||||
return player != null
|
||||
|
||||
|
||||
#func _on_area_entered(area: Area2D) -> void:
|
||||
#if area.is_in_group("Player"):
|
||||
#interactIcon.show()
|
||||
#
|
||||
#
|
||||
#
|
||||
func _on_area_exited(area: Area2D) -> void:
|
||||
if area.is_in_group("Player"):
|
||||
interactIcon.hide()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue