among-eux

Game made in 1 day with flx
git clone git://git.vgx.fr/among-eux
Log | Files | Refs

Levels.gd (441B)


      1 extends Node2D
      2 
      3 
      4 # Declare member variables here. Examples:
      5 # var a = 2
      6 # var b = "text"
      7 
      8 var lvl = 1
      9 var level_scn = preload("res://Level.tscn")
     10 var level
     11 
     12 func _ready():
     13 	level = level_scn.instance()
     14 	add_child(level)
     15 
     16 
     17 func next_lvl():
     18 	lvl += 1
     19 	level.queue_free()
     20 	level = level_scn.instance()
     21 	level.lvl = lvl
     22 	add_child(level)
     23 
     24 # Called every frame. 'delta' is the elapsed time since the previous frame.
     25 #func _process(delta):
     26 #	pass