Skip to content

Commit

Permalink
fixed #9 fixed #2
Browse files Browse the repository at this point in the history
maps needs to be created and designed. What is the scale? scope? goals?
  • Loading branch information
MIfeanyi committed Sep 29, 2017
1 parent 4851037 commit 79fe6d3
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 8 deletions.
24 changes: 23 additions & 1 deletion game.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=20 format=1]
[gd_scene load_steps=22 format=1]

[ext_resource path="res://tilesets/level1.tres" type="TileSet" id=1]
[ext_resource path="res://player.gd" type="Script" id=2]
Expand All @@ -10,6 +10,7 @@
[ext_resource path="res://gfx/Endless/level1_08.png" type="Texture" id=8]
[ext_resource path="res://gfx/Endless/soul.png" type="Texture" id=9]
[ext_resource path="res://gfx/Endless/stairs.png" type="Texture" id=10]
[ext_resource path="res://tilesets/Manager.tscn" type="PackedScene" id=11]

[sub_resource type="RectangleShape2D" id=1]

Expand Down Expand Up @@ -134,6 +135,23 @@ tracks/0/keys = {
"values": [ 0.0, 1.0 ]
}
[sub_resource type="Animation" id=10]
resource/name = "Invisible"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("stairs:visibility/opacity")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = {
"times": FloatArray( 0 ),
"transitions": FloatArray( 1 ),
"update": 0,
"values": [ 0.0 ]
}
[sub_resource type="RectangleShape2D" id=9]
custom_solver_bias = 0.0
Expand Down Expand Up @@ -389,6 +407,7 @@ transform/scale = Vector2( 0.629125, 1.26202 )
[node name="stairs" type="Sprite" parent="Game/Switches/Level 2 Stairs"]
visibility/opacity = 0.0
transform/pos = Vector2( 409.056, 559.319 )
texture = ExtResource( 10 )
Expand All @@ -398,6 +417,7 @@ playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
"anims/Fade In" = SubResource( 8 )
anims/Invisible = SubResource( 10 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
Expand All @@ -420,4 +440,6 @@ shape = SubResource( 9 )
trigger = false
_update_shape_index = 0
[node name="Manager" parent="." instance=ExtResource( 11 )]
22 changes: 15 additions & 7 deletions tilesets/Manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,25 @@ enum STATE {LOADING,LOADED,RESET}

var level =["level1.scn"]
var current_level = 0
var level_scene
onready var level_scene = preload("res://tilesets/levels/tutorial.tscn")

func _ready():
# lOAD TUTORIAL LEVEL
# Initialization here
var l = level_scene.instance()
l.set_name("current_level")
add_child(l)
print("loaded scene")
pass

func _next_level(param1):
var l
if(param1!=null):
#load specific level ie. level_sceene = get_node(level[param1]), current_level = param1
pass
current_level = param1
else:
#increment ie. current_level
pass
current_level = current_level+1

level_scene = load(level[current_level])
l = level_scene.instance()
l.set_name("current_level")
add_child(l)
print(l+" loaded")
pass
29 changes: 29 additions & 0 deletions tilesets/levels/tutorial.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[gd_scene load_steps=2 format=1]

[ext_resource path="res://tilesets/level1.tres" type="TileSet" id=1]

[node name="map" type="Node" groups=[
"level",
]]

[node name="TileMap" type="TileMap" parent="."]

mode = 0
tile_set = ExtResource( 1 )
cell/size = Vector2( 16, 16 )
cell/quadrant_size = 16
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
cell/half_offset = 2
cell/tile_origin = 0
cell/y_sort = false
collision/use_kinematic = false
collision/friction = 1.0
collision/bounce = 0.0
collision/layers = 1
collision/mask = 1
occluder/light_mask = 1
tile_data = IntArray( 65533, 7, 65535, 7, 1, 7, 3, 7, 131072, 7, 131074, 7, 131076, 7, 196612, 7, 262144, 7, 262145, 7, 262147, 7, 262148, 7, 327680, 7, 327681, 7, 327682, 7, 327683, 7, 393217, 7, 393218, 7 )

[node name="Etc" type="Node2D" parent="."]


0 comments on commit 79fe6d3

Please sign in to comment.