forked from interstellar_development/freettrpg
e5911fd155
First major release, refined the creator, added stats to the main game, added a menu to view stats.
18 lines
307 B
GDScript
18 lines
307 B
GDScript
extends Node2D
|
|
|
|
var playerAmount=2
|
|
var playerIndex=0
|
|
var objectName
|
|
|
|
func _ready():
|
|
next()
|
|
|
|
func next():
|
|
if playerIndex >= playerAmount:
|
|
playerIndex = 0
|
|
objectName= "player%d" % playerIndex
|
|
print(objectName)
|
|
get_node(objectName).start()
|
|
get_node(objectName).loadJSON(playerIndex)
|
|
playerIndex += 1
|
|
|