From a8c9e74d2f1f52985c810acab11d1ce5b02eeafe Mon Sep 17 00:00:00 2001 From: Logan Date: Thu, 23 Jul 2020 01:27:37 -0500 Subject: [PATCH] Wands keep between levels --- levels/Campaign/Level0.tscn | 46 +++++++++++++++++++++++++--------- levels/other/Level 1a.tscn | 49 +++++++++++++++++++++++++++++++++++++ levels/other/World.tscn | 3 ++- magic/Wands/ChargedWand.gd | 1 + objects/Door.gd | 5 ++-- objects/Door.tscn | 2 ++ project.godot | 1 + script/Inventory.gd | 35 +++++++++++++------------- ui/Inventory.tscn | 7 ------ 9 files changed, 110 insertions(+), 39 deletions(-) create mode 100644 levels/other/Level 1a.tscn diff --git a/levels/Campaign/Level0.tscn b/levels/Campaign/Level0.tscn index e5b877d..46e7b09 100644 --- a/levels/Campaign/Level0.tscn +++ b/levels/Campaign/Level0.tscn @@ -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 ) diff --git a/levels/other/Level 1a.tscn b/levels/other/Level 1a.tscn new file mode 100644 index 0000000..bcc7e42 --- /dev/null +++ b/levels/other/Level 1a.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=8 format=2] + +[ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1] +[ext_resource path="res://meta/DungeonTilemap.tres" type="TileSet" id=2] +[ext_resource path="res://art/Paralax Dungeon.png" type="Texture" id=3] +[ext_resource path="res://ai/Scenes/ogre.tscn" type="PackedScene" id=4] +[ext_resource path="res://ai/Scenes/Skeleton Enemy.tscn" type="PackedScene" id=5] +[ext_resource path="res://ai/Scenes/Demon.tscn" type="PackedScene" id=6] +[ext_resource path="res://levels/other/Level 1a.gd" type="Script" id=7] + +[node name="Level 1a" type="Node"] +script = ExtResource( 7 ) + +[node name="ParallaxBackground" type="ParallaxBackground" parent="."] + +[node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground"] +motion_mirroring = Vector2( 384, 180 ) + +[node name="Sprite" type="Sprite" parent="ParallaxBackground/ParallaxLayer"] +texture = ExtResource( 3 ) +centered = false + +[node name="TileMap" type="TileMap" parent="." groups=[ +"Tilemap", +]] +tile_set = ExtResource( 2 ) +cell_size = Vector2( 16, 16 ) +format = 1 +tile_data = PoolIntArray( 0, 0, 8, 1, 0, 10, 2, 0, 10, 3, 0, 10, 4, 0, 10, 5, 0, 10, 6, 0, 10, 7, 0, 10, 8, 0, 10, 9, 0, 10, 10, 0, 10, 11, 0, 10, 12, 0, 10, 13, 0, 10, 14, 0, 10, 15, 0, 11, 21, 0, 8, 22, 0, 10, 23, 0, 10, 24, 0, 10, 25, 0, 10, 26, 0, 10, 27, 0, 10, 28, 0, 10, 29, 0, 10, 30, 0, 10, 31, 0, 10, 32, 0, 10, 33, 0, 10, 34, 0, 10, 35, 0, 10, 36, 0, 10, 37, 0, 10, 38, 0, 10, 39, 0, 10, 40, 0, 10, 41, 0, 10, 42, 0, 10, 43, 0, 10, 44, 0, 10, 45, 0, 10, 46, 0, 10, 47, 0, 11, 65536, 0, 65544, 65537, 0, 131081, 65538, 0, 131081, 65539, 0, 131081, 65540, 0, 131081, 65541, 0, 131081, 65542, 0, 131081, 65543, 0, 131081, 65544, 0, 131081, 65545, 0, 131081, 65546, 0, 131081, 65547, 0, 131081, 65548, 0, 131081, 65549, 0, 131081, 65550, 0, 131081, 65551, 0, 131083, 65557, 0, 65544, 65558, 0, 131081, 65559, 0, 131081, 65560, 0, 131081, 65561, 0, 131081, 65562, 0, 131081, 65563, 0, 131081, 65564, 0, 131081, 65565, 0, 131081, 65566, 0, 131078, 65567, 0, 196617, 65568, 0, 196617, 65569, 0, 196617, 65570, 0, 196617, 65571, 0, 196617, 65572, 0, 196617, 65573, 0, 196617, 65574, 0, 196617, 65575, 0, 196617, 65576, 0, 196617, 65577, 0, 196617, 65578, 0, 196617, 65579, 0, 196617, 65580, 0, 196617, 65581, 0, 196617, 65582, 0, 196617, 65583, 0, 196619, 131072, 0, 65544, 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, 131083, 131093, 0, 65544, 131094, 0, 131081, 131095, 0, 131081, 131096, 0, 131081, 131097, 0, 131081, 131098, 0, 131081, 131099, 0, 131081, 131100, 0, 131081, 131101, 0, 131081, 131102, 0, 131083, 196608, 0, 65544, 196609, 0, 131081, 196610, 0, 131081, 196611, 0, 131081, 196612, 0, 131081, 196613, 0, 131081, 196614, 0, 131081, 196615, 0, 131081, 196616, 0, 131081, 196617, 0, 131081, 196618, 0, 131081, 196619, 0, 131081, 196620, 0, 131081, 196621, 0, 131081, 196622, 0, 131081, 196623, 0, 131083, 196629, 0, 65544, 196630, 0, 131081, 196631, 0, 131081, 196632, 0, 131081, 196633, 0, 131081, 196634, 0, 131081, 196635, 0, 131081, 196636, 0, 131081, 196637, 0, 131081, 196638, 0, 131083, 262144, 0, 65544, 262145, 0, 131081, 262146, 0, 131081, 262147, 0, 131081, 262148, 0, 131081, 262149, 0, 131081, 262150, 0, 131081, 262151, 0, 131081, 262152, 0, 131081, 262153, 0, 131081, 262154, 0, 131081, 262155, 0, 131081, 262156, 0, 131081, 262157, 0, 131081, 262158, 0, 131081, 262159, 0, 131083, 262165, 0, 65544, 262166, 0, 131081, 262167, 0, 131081, 262168, 0, 131081, 262169, 0, 131081, 262170, 0, 131081, 262171, 0, 131081, 262172, 0, 131081, 262173, 0, 131081, 262174, 0, 131083, 327680, 0, 65544, 327681, 0, 131081, 327682, 0, 131081, 327683, 0, 131081, 327684, 0, 131081, 327685, 0, 131081, 327686, 0, 131081, 327687, 0, 131081, 327688, 0, 131081, 327689, 0, 131081, 327690, 0, 131081, 327691, 0, 131081, 327692, 0, 131081, 327693, 0, 131081, 327694, 0, 131081, 327695, 0, 131083, 327701, 0, 65544, 327702, 0, 131081, 327703, 0, 131081, 327704, 0, 131081, 327705, 0, 131081, 327706, 0, 131081, 327707, 0, 131081, 327708, 0, 131081, 327709, 0, 131081, 327710, 0, 131083, 393216, 0, 65544, 393217, 0, 131081, 393218, 0, 131081, 393219, 0, 131081, 393220, 0, 131081, 393221, 0, 131081, 393222, 0, 131081, 393223, 0, 131081, 393224, 0, 131081, 393225, 0, 131081, 393226, 0, 131081, 393227, 0, 131081, 393228, 0, 131081, 393229, 0, 131081, 393230, 0, 131081, 393231, 0, 131083, 393237, 0, 65544, 393238, 0, 131081, 393239, 0, 131081, 393240, 0, 131081, 393241, 0, 131081, 393242, 0, 131081, 393243, 0, 131081, 393244, 0, 131081, 393245, 0, 131081, 393246, 0, 131083, 458752, 0, 65544, 458753, 0, 131081, 458754, 0, 131081, 458755, 0, 131081, 458756, 0, 131081, 458757, 0, 131081, 458758, 0, 131081, 458759, 0, 131081, 458760, 0, 131081, 458761, 0, 131081, 458762, 0, 131081, 458763, 0, 131081, 458764, 0, 131081, 458765, 0, 131081, 458766, 0, 131081, 458767, 0, 131083, 458773, 0, 65544, 458774, 0, 131081, 458775, 0, 131081, 458776, 0, 131081, 458777, 0, 131081, 458778, 0, 131081, 458779, 0, 131081, 458780, 0, 131081, 458781, 0, 131081, 458782, 0, 131083, 524288, 0, 65544, 524289, 0, 131081, 524290, 0, 131081, 524291, 0, 131081, 524292, 0, 131081, 524293, 0, 131081, 524294, 0, 131081, 524295, 0, 131081, 524296, 0, 131081, 524297, 0, 131081, 524298, 0, 131081, 524299, 0, 131081, 524300, 0, 131081, 524301, 0, 131081, 524302, 0, 131081, 524303, 0, 131083, 524309, 0, 65544, 524310, 0, 131081, 524311, 0, 131081, 524312, 0, 131081, 524313, 0, 131081, 524314, 0, 131081, 524315, 0, 131081, 524316, 0, 131081, 524317, 0, 131081, 524318, 0, 131083, 589824, 0, 65544, 589825, 0, 131081, 589826, 0, 131081, 589827, 0, 131081, 589828, 0, 131081, 589829, 0, 131081, 589830, 0, 131081, 589831, 0, 131081, 589832, 0, 131081, 589833, 0, 131081, 589834, 0, 131081, 589835, 0, 131081, 589836, 0, 131081, 589837, 0, 131081, 589838, 0, 131078, 589839, 0, 196619, 589845, 0, 196616, 589846, 0, 131077, 589847, 0, 131081, 589848, 0, 131081, 589849, 0, 131081, 589850, 0, 131081, 589851, 0, 131081, 589852, 0, 131081, 589853, 0, 131081, 589854, 0, 131083, 655360, 0, 65544, 655361, 0, 131081, 655362, 0, 131081, 655363, 0, 131081, 655364, 0, 131081, 655365, 0, 131081, 655366, 0, 131081, 655367, 0, 131081, 655368, 0, 131081, 655369, 0, 131081, 655370, 0, 131081, 655371, 0, 131081, 655372, 0, 131081, 655373, 0, 131078, 655374, 0, 196619, 655382, 0, 196616, 655383, 0, 131077, 655384, 0, 131081, 655385, 0, 131081, 655386, 0, 131081, 655387, 0, 131081, 655388, 0, 131081, 655389, 0, 131081, 655390, 0, 131083, 720896, 0, 65544, 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, 131078, 720909, 0, 196619, 720919, 0, 196616, 720920, 0, 131077, 720921, 0, 131081, 720922, 0, 131081, 720923, 0, 131081, 720924, 0, 131081, 720925, 0, 131081, 720926, 0, 65547, 720927, 0, 196610, 720928, 0, 196611, 720931, 0, 196609, 720932, 0, 196611, 720935, 0, 196609, 720936, 0, 196611, 720939, 0, 196609, 720940, 0, 196611, 720943, 0, 196608, 786432, 0, 65544, 786433, 0, 131081, 786434, 0, 131081, 786435, 0, 131081, 786436, 0, 131081, 786437, 0, 131081, 786438, 0, 131081, 786439, 0, 131081, 786440, 0, 131081, 786441, 0, 131081, 786442, 0, 131081, 786443, 0, 131078, 786444, 0, 196619, 786456, 0, 196616, 786457, 0, 131077, 786458, 0, 131081, 786459, 0, 131081, 786460, 0, 131081, 786461, 0, 131081, 786462, 0, 131083, 851968, 0, 65544, 851969, 0, 131081, 851970, 0, 131081, 851971, 0, 131081, 851972, 0, 131081, 851973, 0, 131081, 851974, 0, 131081, 851975, 0, 131081, 851976, 0, 131081, 851977, 0, 131081, 851978, 0, 131078, 851979, 0, 196619, 851993, 0, 196616, 851994, 0, 131077, 851995, 0, 131081, 851996, 0, 131081, 851997, 0, 131081, 851998, 0, 131083, 917504, 0, 65544, 917505, 0, 131078, 917506, 0, 196617, 917507, 0, 196617, 917508, 0, 196617, 917509, 0, 196617, 917510, 0, 196617, 917511, 0, 196617, 917512, 0, 196617, 917513, 0, 196617, 917514, 0, 196619, 917530, 0, 196616, 917531, 0, 196617, 917532, 0, 196617, 917533, 0, 196617, 917534, 0, 196619, 983040, 0, 65544, 983041, 0, 131083, 1048576, 0, 65544, 1048577, 0, 131083, 1114112, 0, 65544, 1114113, 0, 131083, 1179648, 0, 65544, 1179649, 0, 131083, 1245184, 0, 65544, 1245185, 0, 131083, 1310720, 0, 65544, 1310721, 0, 131083, 1376256, 0, 65544, 1376257, 0, 131083, 1441792, 0, 65544, 1441793, 0, 65542, 1441794, 0, 10, 1441795, 0, 10, 1441796, 0, 10, 1441797, 0, 10, 1441798, 0, 10, 1441799, 0, 10, 1441800, 0, 10, 1441801, 0, 10, 1441802, 0, 10, 1441803, 0, 10, 1441804, 0, 10, 1441805, 0, 10, 1441806, 0, 10, 1441807, 0, 10, 1441808, 0, 10, 1441809, 0, 10, 1441810, 0, 10, 1441811, 0, 10, 1441812, 0, 10, 1441813, 0, 10, 1441814, 0, 10, 1441815, 0, 10, 1441816, 0, 10, 1441817, 0, 10, 1441818, 0, 10, 1441819, 0, 10, 1441820, 0, 10, 1441821, 0, 10, 1441822, 0, 10, 1441823, 0, 10, 1441824, 0, 10, 1441825, 0, 10, 1441826, 0, 10, 1441827, 0, 10, 1441828, 0, 10, 1441829, 0, 10, 1441830, 0, 10, 1441831, 0, 10, 1441832, 0, 10, 1441833, 0, 10, 1441834, 0, 10, 1441835, 0, 10, 1441836, 0, 10, 1441837, 0, 10, 1441838, 0, 10, 1441839, 0, 10, 1441840, 0, 10, 1441841, 0, 10, 1441842, 0, 10, 1441843, 0, 10, 1441844, 0, 10, 1441845, 0, 10, 1441846, 0, 10, 1441847, 0, 10, 1441848, 0, 10, 1441849, 0, 10, 1441850, 0, 10, 1441851, 0, 11, 1507328, 0, 196616, 1507329, 0, 196617, 1507330, 0, 196617, 1507331, 0, 196617, 1507332, 0, 196617, 1507333, 0, 196617, 1507334, 0, 196617, 1507335, 0, 196617, 1507336, 0, 196617, 1507337, 0, 196617, 1507338, 0, 196617, 1507339, 0, 196617, 1507340, 0, 196617, 1507341, 0, 196617, 1507342, 0, 196617, 1507343, 0, 196617, 1507344, 0, 196617, 1507345, 0, 196617, 1507346, 0, 196617, 1507347, 0, 196617, 1507348, 0, 196617, 1507349, 0, 196617, 1507350, 0, 196617, 1507351, 0, 196617, 1507352, 0, 196617, 1507353, 0, 196617, 1507354, 0, 196617, 1507355, 0, 196617, 1507356, 0, 196617, 1507357, 0, 196617, 1507358, 0, 196617, 1507359, 0, 196617, 1507360, 0, 196617, 1507361, 0, 196617, 1507362, 0, 196617, 1507363, 0, 196617, 1507364, 0, 196617, 1507365, 0, 196617, 1507366, 0, 196617, 1507367, 0, 196617, 1507368, 0, 196617, 1507369, 0, 196617, 1507370, 0, 196617, 1507371, 0, 196617, 1507372, 0, 196617, 1507373, 0, 196617, 1507374, 0, 196617, 1507375, 0, 196617, 1507376, 0, 196617, 1507377, 0, 196617, 1507378, 0, 196617, 1507379, 0, 196617, 1507380, 0, 196617, 1507381, 0, 196617, 1507382, 0, 196617, 1507383, 0, 196617, 1507384, 0, 196617, 1507385, 0, 196617, 1507386, 0, 196617, 1507387, 0, 196619 ) + +[node name="Player" parent="." instance=ExtResource( 1 )] +position = Vector2( 295.571, 24.0416 ) + +[node name="Enemiees" type="Node" parent="."] + +[node name="Ogre" parent="Enemiees" instance=ExtResource( 4 )] +position = Vector2( 511.501, 172.844 ) + +[node name="Ogre2" parent="Enemiees" instance=ExtResource( 4 )] +position = Vector2( 578.988, 173.316 ) + +[node name="Skeleton Enemy" parent="Enemiees" instance=ExtResource( 5 )] +position = Vector2( 640.209, 165.781 ) + +[node name="Demon" parent="Enemiees" instance=ExtResource( 6 )] +position = Vector2( 705.336, 165.781 ) + +[node name="Demon2" parent="Enemiees" instance=ExtResource( 6 )] +position = Vector2( 760.553, 164.365 ) diff --git a/levels/other/World.tscn b/levels/other/World.tscn index 6babdde..37984e8 100644 --- a/levels/other/World.tscn +++ b/levels/other/World.tscn @@ -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 ) diff --git a/magic/Wands/ChargedWand.gd b/magic/Wands/ChargedWand.gd index 59c7243..5de8739 100644 --- a/magic/Wands/ChargedWand.gd +++ b/magic/Wands/ChargedWand.gd @@ -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() diff --git a/objects/Door.gd b/objects/Door.gd index 1130a43..fc5b175 100644 --- a/objects/Door.gd +++ b/objects/Door.gd @@ -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 diff --git a/objects/Door.tscn b/objects/Door.tscn index 58ac8b3..5586f66 100644 --- a/objects/Door.tscn +++ b/objects/Door.tscn @@ -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 ) diff --git a/project.godot b/project.godot index b6827d5..946cb89 100644 --- a/project.godot +++ b/project.godot @@ -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] diff --git a/script/Inventory.gd b/script/Inventory.gd index 4908981..24bb63b 100644 --- a/script/Inventory.gd +++ b/script/Inventory.gd @@ -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 diff --git a/ui/Inventory.tscn b/ui/Inventory.tscn index 7b5d4aa..3125b3c 100644 --- a/ui/Inventory.tscn +++ b/ui/Inventory.tscn @@ -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