Minor Fixes
This commit is contained in:
parent
a1a252cdc6
commit
8496773e69
3 changed files with 4 additions and 3 deletions
|
@ -8,7 +8,7 @@ custom_features=""
|
||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path="../Desktop/debug"
|
export_path="../Desktop/debug.exe"
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
encrypt_pck=false
|
encrypt_pck=false
|
||||||
|
|
|
@ -13,6 +13,5 @@ func next():
|
||||||
objectName= "player%d" % playerIndex
|
objectName= "player%d" % playerIndex
|
||||||
print(objectName)
|
print(objectName)
|
||||||
get_node(objectName).start()
|
get_node(objectName).start()
|
||||||
get_node(objectName).loadJSON(playerIndex)
|
|
||||||
playerIndex += 1
|
playerIndex += 1
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,16 @@ func get_input():
|
||||||
velocity = input_direction * speed
|
velocity = input_direction * speed
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
|
var toCalculate = position
|
||||||
if active:
|
if active:
|
||||||
get_input()
|
get_input()
|
||||||
move_and_slide()
|
move_and_slide()
|
||||||
var toCalculate = position
|
|
||||||
distanceTo += position.distance_to(toCalculate)
|
distanceTo += position.distance_to(toCalculate)
|
||||||
|
print(distanceTo)
|
||||||
if distanceTo > 500 and active:
|
if distanceTo > 500 and active:
|
||||||
active = false
|
active = false
|
||||||
$camera.enabled = false
|
$camera.enabled = false
|
||||||
|
distanceTo = 0
|
||||||
get_parent().next()
|
get_parent().next()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue