Display banner when reaching goal

This commit is contained in:
Fabien Freling 2018-11-07 13:57:10 +01:00
parent 48ef9f6470
commit 8e83495fd2
3 changed files with 68 additions and 11 deletions

View file

@ -3,11 +3,15 @@ extends KinematicBody
const norm_gravity = -100
var velocity = Vector3()
const MAX_SLOPE_ANGLE = 60
var has_reached_goal = false
func _ready():
pass
func _physics_process(delta):
if has_reached_goal:
return
# Keyboard input
var direction = Vector3()
@ -41,4 +45,5 @@ func _process(delta):
pass
func reach_goal():
print("Reached goal")
has_reached_goal = true
print("Reached goal")