added obstacle-course and end; removed debug hud
This commit is contained in:
parent
920a2458bd
commit
d1017c6b07
10
Main.gd
10
Main.gd
|
@ -46,6 +46,8 @@ var t = 0.0
|
||||||
|
|
||||||
var sun
|
var sun
|
||||||
|
|
||||||
|
var theEnd
|
||||||
|
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready():
|
func _ready():
|
||||||
|
@ -81,6 +83,8 @@ func _ready():
|
||||||
stableTimer.start()
|
stableTimer.start()
|
||||||
print("stabletimer started with waitime: ",stableTimer.get_wait_time())
|
print("stabletimer started with waitime: ",stableTimer.get_wait_time())
|
||||||
|
|
||||||
|
theEnd = $HUD/AcceptDialog
|
||||||
|
|
||||||
|
|
||||||
func _input(event):
|
func _input(event):
|
||||||
if Input.is_action_pressed("click"):
|
if Input.is_action_pressed("click"):
|
||||||
|
@ -216,7 +220,7 @@ func _process(delta):
|
||||||
|
|
||||||
changeEffectsByMood()
|
changeEffectsByMood()
|
||||||
|
|
||||||
sun.rotate_x(delta)
|
sun.rotate_x(delta/2)
|
||||||
|
|
||||||
|
|
||||||
hudMood.text = String(mood)
|
hudMood.text = String(mood)
|
||||||
|
@ -276,3 +280,7 @@ func smoothMood(deltaTime: float):
|
||||||
t=-1
|
t=-1
|
||||||
mood = p0 * (1 - t) + p1 * t
|
mood = p0 * (1 - t) + p1 * t
|
||||||
#print(mood)
|
#print(mood)
|
||||||
|
|
||||||
|
func showEnd():
|
||||||
|
Input.set_mouse_mode(Input.MOUSE_MODE_CONFINED)
|
||||||
|
theEnd.show()
|
||||||
|
|
11
Player.gd
11
Player.gd
|
@ -181,3 +181,14 @@ func getMoodStabilizer():
|
||||||
|
|
||||||
func getAntiDepressant():
|
func getAntiDepressant():
|
||||||
return antiDepressant
|
return antiDepressant
|
||||||
|
|
||||||
|
func unlimitedMeds():
|
||||||
|
antiDepressant = 9999
|
||||||
|
moodStabilizer = 9999
|
||||||
|
|
||||||
|
print("current mood stabilizer: ", moodStabilizer)
|
||||||
|
hud.showMoodStab(String(moodStabilizer))
|
||||||
|
|
||||||
|
|
||||||
|
print("current anti depressant: ", antiDepressant)
|
||||||
|
hud.showAntiDep(String(antiDepressant))
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
extends Area
|
||||||
|
|
||||||
|
|
||||||
|
# Declare member variables here. Examples:
|
||||||
|
# var a = 2
|
||||||
|
# var b = "text"
|
||||||
|
|
||||||
|
var player
|
||||||
|
var main
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready():
|
||||||
|
player = get_node(@"../../Player")
|
||||||
|
main = get_node(@"../../")
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func _physics_process(delta):
|
||||||
|
rotate_y(delta)
|
||||||
|
|
||||||
|
if(overlaps_body(player)):
|
||||||
|
player.unlimitedMeds()
|
||||||
|
main.showEnd()
|
||||||
|
queue_free()
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
#func _process(delta):
|
||||||
|
# pass
|
Loading…
Reference in New Issue