Second Prototype; Added Player Animations
This commit is contained in:
parent
51774f485b
commit
e82438139f
13 changed files with 332 additions and 73 deletions
|
|
@ -6,6 +6,8 @@
|
|||
radius = 12.0
|
||||
|
||||
[node name="Vase" instance=ExtResource("1_fkdlr")]
|
||||
light_mask = 8
|
||||
visibility_layer = 8
|
||||
y_sort_enabled = true
|
||||
|
||||
[node name="CollisionShape2D" parent="." index="0"]
|
||||
|
|
|
|||
|
|
@ -8,11 +8,6 @@ const heavy = 50
|
|||
var player = null
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
#if player != null and weight >= heavy :
|
||||
#global_position.y = move_toward(global_position.y, player.global_position.y, 5)
|
||||
#global_position.x = move_toward(global_position.x, player.global_position.x, 5)
|
||||
|
||||
#if player != null and weight <= heavy :
|
||||
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)
|
||||
|
|
@ -28,3 +23,9 @@ func drop():
|
|||
|
||||
func getWeight():
|
||||
return weight
|
||||
|
||||
func getValue():
|
||||
return value
|
||||
|
||||
func isCarryied():
|
||||
return player != null
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue