#14 ajout de la notion de terrain, de planète et de zone contaminée
This commit is contained in:
@@ -5,7 +5,10 @@ const LERP_WEIGHT = 0.9
|
||||
|
||||
@export var following : Node2D
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
func _ready():
|
||||
if following:
|
||||
global_position = following.global_position
|
||||
|
||||
func _process(_delta):
|
||||
if following:
|
||||
global_position = following.global_position.lerp(global_position, LERP_WEIGHT)
|
||||
|
||||
@@ -3,6 +3,7 @@ class_name Player
|
||||
|
||||
signal player_stats_updated(player : Player)
|
||||
|
||||
var planet : Planet # mis à jour par la classe Planet
|
||||
@export var speed = 400
|
||||
|
||||
var energy : int = 10 :
|
||||
|
||||
Reference in New Issue
Block a user