14 lines
396 B
GDScript
14 lines
396 B
GDScript
class_name Player
|
|
extends Node2D
|
|
|
|
## export variables
|
|
@export var attributes: PlayerAttributes ## The attributes resource that defines the player's abilities, vitals etc.
|
|
|
|
## 'onready' variables
|
|
@onready var player_nav: NavigationAgent2D = $PlayerNav
|
|
@onready var player_sprite: Sprite2D = $PlayerSprite
|
|
|
|
func _ready() -> void:
|
|
if attributes:
|
|
player_sprite.texture = attributes.player_texture
|