From 4851037ce87799bb77eeb822a89a9ffac5d7ddc7 Mon Sep 17 00:00:00 2001 From: Michael Redford Date: Thu, 28 Sep 2017 20:33:20 -0600 Subject: [PATCH] init for #9 --- player.gd | 3 +-- tilesets/Manager.gd | 20 ++++++++++++++++++++ tilesets/Manager.tscn | 9 +++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 tilesets/Manager.gd create mode 100644 tilesets/Manager.tscn diff --git a/player.gd b/player.gd index 5067286..a1d025f 100644 --- a/player.gd +++ b/player.gd @@ -33,9 +33,8 @@ func _fixed_process(delta): tutorial.display("decend to begin...") hero.control = LOCKED elif(other.is_in_group("stairs")): - #LOAD level 2 + #LOAD level 2 pass - #TODO: enable player to proceed down stairs. if Input.is_action_pressed("ui_right"): hero.pos += Vector2(1,0) diff --git a/tilesets/Manager.gd b/tilesets/Manager.gd new file mode 100644 index 0000000..41f3cce --- /dev/null +++ b/tilesets/Manager.gd @@ -0,0 +1,20 @@ +extends Node + +enum STATE {LOADING,LOADED,RESET} + +var level =["level1.scn"] +var current_level = 0 +var level_scene + +func _ready(): + # lOAD TUTORIAL LEVEL + # Initialization here + pass +func _next_level(param1): + if(param1!=null): + #load specific level ie. level_sceene = get_node(level[param1]), current_level = param1 + pass + else: + #increment ie. current_level + pass + pass \ No newline at end of file diff --git a/tilesets/Manager.tscn b/tilesets/Manager.tscn new file mode 100644 index 0000000..b76e2fe --- /dev/null +++ b/tilesets/Manager.tscn @@ -0,0 +1,9 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://tilesets/Manager.gd" type="Script" id=1] + +[node name="Manager" type="Node"] + +script/script = ExtResource( 1 ) + +