Skip to content

Commit

Permalink
fixed #15 #4
Browse files Browse the repository at this point in the history
  • Loading branch information
MIfeanyi committed Oct 2, 2017
1 parent a1597d8 commit 89a8536
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 14 deletions.
1 change: 0 additions & 1 deletion Player.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ drag_margin/bottom = 0.2

[node name="UI" type="CanvasLayer" parent="."]

editor/display_folded = true
layer = 1
offset = Vector2( 0, 0 )
rotation = 0.0
Expand Down
4 changes: 3 additions & 1 deletion player.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
extends KinematicBody2D
signal on_stairs

onready var tutorial = get_node("UI/Tutorial")
onready var tutorial = get_node("UI/Hint")
enum Direction {RIGHT, LEFT}
enum STATUS {IDLE, STANDING, RUNNING, ATTACKING}
enum CONTROL {LOCKED, UNLOCKED}
Expand Down Expand Up @@ -34,6 +35,7 @@ func _move(delta):
hero.control = LOCKED
elif(other.is_in_group("stairs")):
other.action()
emit_signal("on_stairs")
pass

if Input.is_action_pressed("ui_right"):
Expand Down
2 changes: 1 addition & 1 deletion tilesets/Manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func _ready():
print("loaded scene")
pass

func _next_level(param1):
func change(param1):
var l
if(param1!=null):
current_level = param1
Expand Down
27 changes: 16 additions & 11 deletions tilesets/levels/Tutorial.tscn
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[gd_scene load_steps=7 format=1]
[gd_scene load_steps=8 format=1]

[ext_resource path="res://tilesets/level1.tres" type="TileSet" id=1]
[ext_resource path="res://tilesets/levels/switchl1.gd" type="Script" id=2]
[ext_resource path="res://gfx/Endless/stairs.png" type="Texture" id=3]
[ext_resource path="res://Player.tscn" type="PackedScene" id=4]
[ext_resource path="res://NPC/soul.tscn" type="PackedScene" id=5]
[ext_resource path="res://tilesets/levels/Tutorial.gd" type="Script" id=1]
[ext_resource path="res://tilesets/level1.tres" type="TileSet" id=2]
[ext_resource path="res://tilesets/levels/switchl1.gd" type="Script" id=3]
[ext_resource path="res://gfx/Endless/stairs.png" type="Texture" id=4]
[ext_resource path="res://Player.tscn" type="PackedScene" id=5]
[ext_resource path="res://NPC/soul.tscn" type="PackedScene" id=6]

[sub_resource type="RectangleShape2D" id=1]

Expand All @@ -15,10 +16,12 @@ extents = Vector2( 16.389, 15.7118 )
"level",
]]

script/script = ExtResource( 1 )

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

mode = 0
tile_set = ExtResource( 1 )
tile_set = ExtResource( 2 )
cell/size = Vector2( 32, 32 )
cell/quadrant_size = 17
cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 )
Expand Down Expand Up @@ -48,11 +51,11 @@ shapes/0/trigger = false
collision/layers = 1
collision/mask = 1
collision/margin = 0.08
script/script = ExtResource( 2 )
script/script = ExtResource( 3 )

[node name="img" type="Sprite" parent="stairs"]

texture = ExtResource( 3 )
texture = ExtResource( 4 )

[node name="StaticBody2D" type="StaticBody2D" parent="stairs"]

Expand All @@ -70,14 +73,16 @@ shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

[node name="Player" parent="." instance=ExtResource( 4 )]
[node name="Player" parent="." instance=ExtResource( 5 )]

transform/pos = Vector2( 421.116, 436.465 )
transform/scale = Vector2( 1.23867, 0.910528 )

[node name="soul" parent="." instance=ExtResource( 5 )]
[node name="soul" parent="." instance=ExtResource( 6 )]

transform/pos = Vector2( 438.303, 264.158 )
transform/scale = Vector2( 1.38351, 0.840665 )

[connection signal="on_stairs" from="Player" to="." method="_on_Player_on_stairs"]


1 change: 1 addition & 0 deletions tilesets/levels/switchl1.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ extends KinematicBody2D

func _ready():
set_fixed_process(true)

pass
func _display():
print("this works")
Expand Down

0 comments on commit 89a8536

Please sign in to comment.