Wands keep between levels
This commit is contained in:
parent
58125eb887
commit
a8c9e74d2f
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=7 format=2]
|
||||
[gd_scene load_steps=8 format=2]
|
||||
|
||||
[ext_resource path="res://Music and Fonts(Misc.)/Hawaii Partii - Stranded Lullaby(8-Bit).wav" type="AudioStream" id=1]
|
||||
[ext_resource path="res://npc/Wizard.tscn" type="PackedScene" id=2]
|
||||
|
@ -7,6 +7,22 @@
|
|||
[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=5]
|
||||
[ext_resource path="res://meta/DungeonTilemap.tscn" type="PackedScene" id=6]
|
||||
|
||||
[sub_resource type="Animation" id=1]
|
||||
resource_name = "Door Opening"
|
||||
length = 0.12
|
||||
tracks/0/type = "value"
|
||||
tracks/0/path = NodePath(".:frame")
|
||||
tracks/0/interp = 1
|
||||
tracks/0/loop_wrap = true
|
||||
tracks/0/imported = false
|
||||
tracks/0/enabled = true
|
||||
tracks/0/keys = {
|
||||
"times": PoolRealArray( 0, 0.1 ),
|
||||
"transitions": PoolRealArray( 1, 1 ),
|
||||
"update": 1,
|
||||
"values": [ 0, 1 ]
|
||||
}
|
||||
|
||||
[node name="World" type="Node2D"]
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
|
@ -14,24 +30,32 @@ stream = ExtResource( 1 )
|
|||
volume_db = -21.204
|
||||
autoplay = true
|
||||
|
||||
[node name="Door" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 180, 128 )
|
||||
next_scene = "res://levels/Campaign/Level 1/Level 1.tscn"
|
||||
|
||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||
color = Color( 0.564706, 0.564706, 0.564706, 1 )
|
||||
|
||||
[node name="Door" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 175, 126 )
|
||||
next_scene = "res://levels/Campaign/Level 1/Level 1.tscn"
|
||||
|
||||
[node name="torch" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 85, 91 )
|
||||
|
||||
[node name="torch2" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 171, 87 )
|
||||
|
||||
[node name="Wizard" parent="." instance=ExtResource( 2 )]
|
||||
position = Vector2( 128, 160 )
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource( 5 )]
|
||||
position = Vector2( 74, 158 )
|
||||
|
||||
[node name="torch" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 85, 91 )
|
||||
|
||||
[node name="torch2" parent="." instance=ExtResource( 4 )]
|
||||
position = Vector2( 171, 91 )
|
||||
|
||||
[node name="TileMap" parent="." instance=ExtResource( 6 )]
|
||||
tile_data = PoolIntArray( 131069, 0, 8, 131070, 0, 10, 131071, 0, 10, 65536, 0, 10, 65537, 0, 10, 65538, 0, 10, 65539, 0, 10, 65540, 0, 10, 65541, 0, 10, 65542, 0, 10, 65543, 0, 10, 65544, 0, 10, 65545, 0, 10, 65546, 0, 10, 65547, 0, 10, 65548, 0, 10, 65549, 0, 10, 65550, 0, 10, 65551, 0, 10, 65552, 0, 10, 65553, 0, 10, 65554, 0, 11, 196605, 0, 65544, 196606, 0, 131081, 196607, 0, 131081, 131072, 0, 131081, 131073, 0, 131081, 131074, 0, 131081, 131075, 0, 131081, 131076, 0, 131081, 131077, 0, 131081, 131078, 0, 131081, 131079, 0, 131081, 131080, 0, 131081, 131081, 0, 131081, 131082, 0, 131081, 131083, 0, 131081, 131084, 0, 131081, 131085, 0, 131081, 131086, 0, 131081, 131087, 0, 131081, 131088, 0, 131081, 131089, 0, 131081, 131090, 0, 131083, 262141, 0, 65544, 262142, 0, 131081, 262143, 0, 131081, 196608, 0, 131081, 196609, 0, 131078, 196610, 0, 196617, 196611, 0, 196617, 196612, 0, 196617, 196613, 0, 196617, 196614, 0, 196617, 196615, 0, 196617, 196616, 0, 196617, 196617, 0, 196617, 196618, 0, 196617, 196619, 0, 196617, 196620, 0, 196617, 196621, 0, 196617, 196622, 0, 131077, 196623, 0, 131081, 196624, 0, 131081, 196625, 0, 131081, 196626, 0, 131083, 327677, 0, 65544, 327678, 0, 131081, 327679, 0, 131081, 262144, 0, 131081, 262145, 0, 131083, 262158, 0, 65544, 262159, 0, 131081, 262160, 0, 131081, 262161, 0, 131081, 262162, 0, 131083, 393213, 0, 65544, 393214, 0, 131081, 393215, 0, 131081, 327680, 0, 131081, 327681, 0, 131083, 327694, 0, 65544, 327695, 0, 131081, 327696, 0, 131081, 327697, 0, 131081, 327698, 0, 131083, 458749, 0, 65544, 458750, 0, 131081, 458751, 0, 131081, 393216, 0, 131081, 393217, 0, 131083, 393230, 0, 65544, 393231, 0, 131081, 393232, 0, 131081, 393233, 0, 131081, 393234, 0, 131083, 524285, 0, 65544, 524286, 0, 131081, 524287, 0, 131081, 458752, 0, 131081, 458753, 0, 131083, 458766, 0, 65544, 458767, 0, 131081, 458768, 0, 131081, 458769, 0, 131081, 458770, 0, 131083, 589821, 0, 65544, 589822, 0, 131081, 589823, 0, 131081, 524288, 0, 131081, 524289, 0, 131083, 524302, 0, 65544, 524303, 0, 131081, 524304, 0, 131081, 524305, 0, 131081, 524306, 0, 131083, 655357, 0, 65544, 655358, 0, 131081, 655359, 0, 131081, 589824, 0, 131081, 589825, 0, 131083, 589838, 0, 65544, 589839, 0, 131081, 589840, 0, 131081, 589841, 0, 131081, 589842, 0, 131083, 720893, 0, 65544, 720894, 0, 131081, 720895, 0, 131081, 655360, 0, 131081, 655361, 0, 65542, 655362, 0, 10, 655363, 0, 10, 655364, 0, 10, 655365, 0, 10, 655366, 0, 10, 655367, 0, 10, 655368, 0, 10, 655369, 0, 10, 655370, 0, 10, 655371, 0, 10, 655372, 0, 10, 655373, 0, 10, 655374, 0, 65541, 655375, 0, 131081, 655376, 0, 131081, 655377, 0, 131081, 655378, 0, 131083, 786429, 0, 65544, 786430, 0, 131081, 786431, 0, 131081, 720896, 0, 131081, 720897, 0, 131081, 720898, 0, 131081, 720899, 0, 131081, 720900, 0, 131081, 720901, 0, 131081, 720902, 0, 131081, 720903, 0, 131081, 720904, 0, 131081, 720905, 0, 131081, 720906, 0, 131081, 720907, 0, 131081, 720908, 0, 131081, 720909, 0, 131081, 720910, 0, 131081, 720911, 0, 131081, 720912, 0, 131081, 720913, 0, 131081, 720914, 0, 131083, 851965, 0, 196616, 851966, 0, 196617, 851967, 0, 196617, 786432, 0, 196617, 786433, 0, 196617, 786434, 0, 196617, 786435, 0, 196617, 786436, 0, 196617, 786437, 0, 196617, 786438, 0, 196617, 786439, 0, 196617, 786440, 0, 196617, 786441, 0, 196617, 786442, 0, 196617, 786443, 0, 196617, 786444, 0, 196617, 786445, 0, 196617, 786446, 0, 196617, 786447, 0, 196617, 786448, 0, 196617, 786449, 0, 196617, 786450, 0, 196619 )
|
||||
|
||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource( 1 )
|
||||
volume_db = -21.204
|
||||
autoplay = true
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
"anims/Door Opening" = SubResource( 1 )
|
||||
|
|
49
levels/other/Level 1a.tscn
Normal file
49
levels/other/Level 1a.tscn
Normal file
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,8 @@ autoplay = true
|
|||
|
||||
[node name="Door" parent="." instance=ExtResource( 3 )]
|
||||
position = Vector2( 180, 128 )
|
||||
unlocked = false
|
||||
unlocked = true
|
||||
next_scene = "res://levels/other/Level 1a.gd"
|
||||
|
||||
[node name="CanvasModulate" type="CanvasModulate" parent="."]
|
||||
color = Color( 0.564706, 0.564706, 0.564706, 1 )
|
||||
|
|
|
@ -7,6 +7,7 @@ var projectile = null
|
|||
onready var ChargeTimer: Timer = $ChargeTimer
|
||||
|
||||
func fire(p):
|
||||
print(p)
|
||||
projectile = p
|
||||
if ChargeTimer.is_stopped():
|
||||
ChargeTimer.start()
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
extends Sprite
|
||||
|
||||
export var unlocked: bool = true
|
||||
export var next_scene: String = ""
|
||||
export var next_scene: String
|
||||
|
||||
onready var door = get_node("AnimationPlayer")
|
||||
|
||||
func _process(delta):
|
||||
print(next_scene)
|
||||
if $Area2D.get_overlapping_bodies().size() != 0:
|
||||
if unlocked:
|
||||
if true:
|
||||
$Label.text = "F to Open"
|
||||
if Input.is_action_just_pressed("open"):
|
||||
Player.current_scene = next_scene
|
||||
|
|
|
@ -27,10 +27,12 @@ extents = Vector2( 14, 13 )
|
|||
font_data = ExtResource( 1 )
|
||||
|
||||
[node name="Door" type="Sprite"]
|
||||
position = Vector2( -16, -19 )
|
||||
texture = ExtResource( 2 )
|
||||
centered = false
|
||||
hframes = 2
|
||||
script = ExtResource( 3 )
|
||||
unlocked = false
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
"anims/Door Opening" = SubResource( 1 )
|
||||
|
|
|
@ -57,6 +57,7 @@ _global_script_class_icons={
|
|||
[application]
|
||||
|
||||
config/name="Gamejam"
|
||||
run/main_scene="res://levels/Campaign/Level0.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[autoload]
|
||||
|
|
|
@ -47,27 +47,28 @@ func _ready():
|
|||
add_item(id)
|
||||
if Player.current_wand != -1:
|
||||
active_conduit = Globals.Magic[Player.current_wand]
|
||||
yield(get_tree(), "idle_frame")
|
||||
parent.WandPosition.set_current_conduit(active_conduit)
|
||||
match Player.current_wand:
|
||||
0:
|
||||
Globals.Conduit1:
|
||||
ConduitSelect.global_position = Conduit1Position.global_position
|
||||
1:
|
||||
Globals.Conduit2:
|
||||
ConduitSelect.global_position = Conduit2Position.global_position
|
||||
2:
|
||||
Globals.Conduit3:
|
||||
ConduitSelect.global_position = Conduit3Position.global_position
|
||||
3:
|
||||
Globals.Conduit4:
|
||||
ConduitSelect.global_position = Conduit4Position.global_position
|
||||
|
||||
if Player.current_spell != -1:
|
||||
active_projectile = Globals.Magic[Player.current_wand]
|
||||
active_projectile = Globals.Magic[Player.current_spell]
|
||||
match Player.current_spell:
|
||||
4:
|
||||
Globals.Projectile1:
|
||||
ProjectileSelect.global_position = Projectile1Position.global_position
|
||||
5:
|
||||
Globals.Projectile2:
|
||||
ProjectileSelect.global_position = Projectile2Position.global_position
|
||||
6:
|
||||
Globals.Projectile3:
|
||||
ProjectileSelect.global_position = Projectile3Position.global_position
|
||||
7:
|
||||
Globals.Projectile4:
|
||||
ProjectileSelect.global_position = Projectile3Position.global_position
|
||||
|
||||
func _process(delta):
|
||||
|
@ -127,28 +128,28 @@ func add_item(index):
|
|||
|
||||
func _on_Conduit1_toggled():
|
||||
if Conduit1.is_visible() and active_conduit != Globals.Magic[Globals.Conduit1]:
|
||||
Player.current_wand = Globals.Magicp
|
||||
Player.current_wand = Globals.Conduit1
|
||||
active_conduit = Globals.Magic[Globals.Conduit1]
|
||||
parent.WandPosition.set_current_conduit(active_conduit)
|
||||
ConduitSelect.global_position = Conduit1Position.global_position
|
||||
|
||||
func _on_Conduit2_toggled():
|
||||
if Conduit2.is_visible() and active_conduit != Globals.Magic[Globals.Conduit2]:
|
||||
active_conduit = Globals.Magic[Globals.Conduit2]
|
||||
Player.current_wand = Globals.Conduit2
|
||||
active_conduit = Globals.Magic[Globals.Conduit2]
|
||||
parent.WandPosition.set_current_conduit(active_conduit)
|
||||
ConduitSelect.global_position = Conduit2Position.global_position
|
||||
|
||||
func _on_Conduit3_toggled():
|
||||
if Conduit3.is_visible() and active_conduit != Globals.Magic[Globals.Conduit3]:
|
||||
active_conduit = Globals.Magic[Globals.Conduit3]
|
||||
Player.current_wand = Globals.Conduit3
|
||||
active_conduit = Globals.Magic[Globals.Conduit3]
|
||||
parent.WandPosition.set_current_conduit(active_conduit)
|
||||
ConduitSelect.global_position = Conduit3Position.global_position
|
||||
|
||||
func _on_Conduit4_toggled():
|
||||
if Conduit4.is_visible() and active_conduit != Globals.Magic[Globals.Conduit4]:
|
||||
active_conduit = Globals.Magic[Globals.Conduit4]
|
||||
Player.current_wand = Globals.Conduit4
|
||||
active_conduit = Globals.Magic[Globals.Conduit4]
|
||||
parent.WandPosition.set_current_conduit(active_conduit)
|
||||
ConduitSelect.global_position = Conduit4Position.global_position
|
||||
|
@ -156,28 +157,28 @@ func _on_Conduit4_toggled():
|
|||
|
||||
func _on_Projectile1_pressed():
|
||||
if Projectile1.is_visible() and active_projectile != Globals.Magic[Globals.Projectile1]:
|
||||
Player.active_spell = Globals.Magic[Globals.Conduit1]
|
||||
Player.current_spell = Globals.Projectile1
|
||||
active_projectile = Globals.Magic[Globals.Projectile1]
|
||||
ProjectileSelect.global_position = Projectile1Position.global_position
|
||||
|
||||
|
||||
func _on_Projectile2_pressed():
|
||||
if Projectile2.is_visible() and active_projectile != Globals.Magic[Globals.Projectile2]:
|
||||
Player.active_spell = Globals.Magic[Globals.Conduit2]
|
||||
Player.current_spell = Globals.Projectile2
|
||||
active_projectile = Globals.Magic[Globals.Projectile2]
|
||||
ProjectileSelect.global_position = Projectile2Position.global_position
|
||||
|
||||
|
||||
func _on_Projectile3_pressed():
|
||||
if Projectile3.is_visible() and active_projectile != Globals.Magic[Globals.Projectile3]:
|
||||
Player.active_spell = Globals.Magic[Globals.Conduit3]
|
||||
Player.current_spell = Globals.Projectile3
|
||||
active_projectile = Globals.Magic[Globals.Projectile3]
|
||||
ProjectileSelect.global_position = Projectile3Position.global_position
|
||||
|
||||
|
||||
func _on_Projectile4_pressed():
|
||||
if Projectile4.is_visible() and active_projectile != Globals.Magic[Globals.Projectile4]:
|
||||
Player.active_spell = Globals.Magic[Globals.Conduit4]
|
||||
Player.current_spell = Globals.Globals.Projectile4
|
||||
active_projectile = Globals.Magic[Globals.Projectile4]
|
||||
ProjectileSelect.global_position = Projectile4Position.global_position
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ texture = ExtResource( 1 )
|
|||
[node name="Conduits" type="Node2D" parent="Inventory"]
|
||||
|
||||
[node name="Conduit1" type="TextureButton" parent="Inventory/Conduits"]
|
||||
visible = false
|
||||
light_mask = -2147483647
|
||||
margin_left = -47.0
|
||||
margin_top = -30.0
|
||||
|
@ -77,7 +76,6 @@ __meta__ = {
|
|||
position = Vector2( 7, 9 )
|
||||
|
||||
[node name="Conduit2" type="TextureButton" parent="Inventory/Conduits"]
|
||||
visible = false
|
||||
light_mask = -2147483647
|
||||
margin_left = -26.0
|
||||
margin_top = -30.0
|
||||
|
@ -95,7 +93,6 @@ __meta__ = {
|
|||
position = Vector2( 9, 9 )
|
||||
|
||||
[node name="Conduit3" type="TextureButton" parent="Inventory/Conduits"]
|
||||
visible = false
|
||||
light_mask = -2147483647
|
||||
margin_left = -49.0
|
||||
margin_top = -6.0
|
||||
|
@ -113,7 +110,6 @@ __meta__ = {
|
|||
position = Vector2( 9, 10 )
|
||||
|
||||
[node name="Conduit4" type="TextureButton" parent="Inventory/Conduits"]
|
||||
visible = false
|
||||
light_mask = -2147483647
|
||||
margin_left = -24.0
|
||||
margin_top = -6.0
|
||||
|
@ -149,7 +145,6 @@ __meta__ = {
|
|||
position = Vector2( 9, 7 )
|
||||
|
||||
[node name="Projectile2" type="TextureButton" parent="Inventory/Projectiles"]
|
||||
visible = false
|
||||
margin_left = 29.0
|
||||
margin_top = -30.0
|
||||
margin_right = 45.0
|
||||
|
@ -166,7 +161,6 @@ __meta__ = {
|
|||
position = Vector2( 8, 7 )
|
||||
|
||||
[node name="Projectile3" type="TextureButton" parent="Inventory/Projectiles"]
|
||||
visible = false
|
||||
margin_left = 4.0
|
||||
margin_top = -2.0
|
||||
margin_right = 20.0
|
||||
|
@ -183,7 +177,6 @@ __meta__ = {
|
|||
position = Vector2( 9, 7 )
|
||||
|
||||
[node name="Projectile4" type="TextureButton" parent="Inventory/Projectiles"]
|
||||
visible = false
|
||||
margin_left = 29.0
|
||||
margin_top = -2.0
|
||||
margin_right = 45.0
|
||||
|
|
Loading…
Reference in a new issue