added obstacle-course and end; removed debug hud
This commit is contained in:
parent
920a2458bd
commit
d1017c6b07
12
Main.gd
12
Main.gd
|
@ -46,6 +46,8 @@ var t = 0.0
|
|||
|
||||
var sun
|
||||
|
||||
var theEnd
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
|
@ -76,10 +78,12 @@ func _ready():
|
|||
depressionTimer.connect("timeout", self, "_on_DepressionTimer_timeout")
|
||||
# moodStabilizerTimer.connect("timeout", self, "_on_MoodStabilizerTimer_timeout")
|
||||
# antiDepressantTimer.connect("timeout", self, "_on_AntiDepressantTimer_timeout")
|
||||
|
||||
|
||||
stableTimer.set_wait_time(secondsPerWeek*averageStable+rng.randf_range(-secondsPerWeek/5,+secondsPerWeek/5))
|
||||
stableTimer.start()
|
||||
print("stabletimer started with waitime: ",stableTimer.get_wait_time())
|
||||
|
||||
theEnd = $HUD/AcceptDialog
|
||||
|
||||
|
||||
func _input(event):
|
||||
|
@ -216,7 +220,7 @@ func _process(delta):
|
|||
|
||||
changeEffectsByMood()
|
||||
|
||||
sun.rotate_x(delta)
|
||||
sun.rotate_x(delta/2)
|
||||
|
||||
|
||||
hudMood.text = String(mood)
|
||||
|
@ -276,3 +280,7 @@ func smoothMood(deltaTime: float):
|
|||
t=-1
|
||||
mood = p0 * (1 - t) + p1 * t
|
||||
#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():
|
||||
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