Initial commit

Un bout de jeu, qui fait pas grand chose mais on progresse.
This commit is contained in:
Thomas
2025-02-21 17:59:47 +01:00
commit fe463ad396
74 changed files with 59217 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
extends Node2D
@export var animation_tree: AnimationTree
@onready var player : Player = get_owner()
var last_facing_direction = Vector2(0,-1) # facing south
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
var idle = !player.velocity
if !idle:
last_facing_direction = player.velocity.normalized()
animation_tree.set("parameters/walking/blend_position", last_facing_direction)
animation_tree.set("parameters/idling/blend_position", last_facing_direction)
animation_tree.set("parameters/grabing/blend_position", last_facing_direction)