diff --git a/WandClass.gd b/WandClass.gd new file mode 100644 index 0000000..c5be963 --- /dev/null +++ b/WandClass.gd @@ -0,0 +1,5 @@ +extends Sprite +class_name Wand + +func fire(projectile, effect): + diff --git a/art/BouncingWand.png b/art/BouncingWand.png index 473c22f..8a24d1d 100644 Binary files a/art/BouncingWand.png and b/art/BouncingWand.png differ diff --git a/art/MineProjectile.png b/art/MineProjectile.png new file mode 100644 index 0000000..8fac032 Binary files /dev/null and b/art/MineProjectile.png differ diff --git a/art/MineProjectile.png.import b/art/MineProjectile.png.import new file mode 100644 index 0000000..15dbf36 --- /dev/null +++ b/art/MineProjectile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/MineProjectile.png-04c7c0f942ff2570fe207ea05c50db50.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/MineProjectile.png" +dest_files=[ "res://.import/MineProjectile.png-04c7c0f942ff2570fe207ea05c50db50.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/art/PhantomProjectile.png b/art/PhantomProjectile.png new file mode 100644 index 0000000..2a915cb Binary files /dev/null and b/art/PhantomProjectile.png differ diff --git a/art/PhantomProjectile.png.import b/art/PhantomProjectile.png.import new file mode 100644 index 0000000..16a6ff0 --- /dev/null +++ b/art/PhantomProjectile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/PhantomProjectile.png-920953235b3fd826065feb9e4ceff381.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/PhantomProjectile.png" +dest_files=[ "res://.import/PhantomProjectile.png-920953235b3fd826065feb9e4ceff381.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/art/Wand.png b/art/Wand.png index 7a99653..40825de 100644 Binary files a/art/Wand.png and b/art/Wand.png differ diff --git a/art/WaveProjectile.png b/art/WaveProjectile.png new file mode 100644 index 0000000..e62f23b Binary files /dev/null and b/art/WaveProjectile.png differ diff --git a/art/WaveProjectile.png.import b/art/WaveProjectile.png.import new file mode 100644 index 0000000..fc3e959 --- /dev/null +++ b/art/WaveProjectile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/WaveProjectile.png-c1dd38bdaf21fb47c906fd45756d877f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/WaveProjectile.png" +dest_files=[ "res://.import/WaveProjectile.png-c1dd38bdaf21fb47c906fd45756d877f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/art/ecoprojectile.png b/art/ecoprojectile.png new file mode 100644 index 0000000..cae0688 Binary files /dev/null and b/art/ecoprojectile.png differ diff --git a/art/ecoprojectile.png.import b/art/ecoprojectile.png.import new file mode 100644 index 0000000..3619ae8 --- /dev/null +++ b/art/ecoprojectile.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/ecoprojectile.png-f2afcd9ee7a1ca96391bf5fdacb6ae71.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/ecoprojectile.png" +dest_files=[ "res://.import/ecoprojectile.png-f2afcd9ee7a1ca96391bf5fdacb6ae71.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/characters/Player.tscn b/characters/Player.tscn index 366c66b..b56e3f8 100644 --- a/characters/Player.tscn +++ b/characters/Player.tscn @@ -85,7 +85,7 @@ drag_margin_bottom = 0.0 script = ExtResource( 4 ) [node name="WandManager" type="Position2D" parent="."] -position = Vector2( 0, -7 ) +position = Vector2( 0, -8 ) script = ExtResource( 7 ) [node name="Sprite" type="Sprite" parent="."] diff --git a/magic/Wands/BouncyWand.tscn b/magic/Wands/BouncyWand.tscn index 5f3d0a7..5dbb3e0 100644 --- a/magic/Wands/BouncyWand.tscn +++ b/magic/Wands/BouncyWand.tscn @@ -2,7 +2,6 @@ [ext_resource path="res://art/BouncingWand.png" type="Texture" id=1] - [node name="BouncyWand" type="Sprite"] rotation = 1.5708 texture = ExtResource( 1 ) diff --git a/magic/Wands/ChargedWand.tscn b/magic/Wands/ChargedWand.tscn index bb122ae..7134f33 100644 --- a/magic/Wands/ChargedWand.tscn +++ b/magic/Wands/ChargedWand.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://art/Wand.png" type="Texture" id=2] [node name="ChargedWand" type="Sprite"] -position = Vector2( 7, 0 ) +position = Vector2( 9, 0 ) rotation = 1.5708 texture = ExtResource( 2 ) diff --git a/magic/projectiles/Projectile1.tscn b/magic/projectiles/Projectile1.tscn deleted file mode 100644 index 5fbf33d..0000000 --- a/magic/projectiles/Projectile1.tscn +++ /dev/null @@ -1,30 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://script/Projectile.gd" type="Script" id=1] -[ext_resource path="res://art/WhiteProjectile.png" type="Texture" id=2] - -[sub_resource type="CircleShape2D" id=1] -radius = 4.0 - -[sub_resource type="Environment" id=2] -background_mode = 4 -glow_enabled = true -glow_intensity = 0.25 -glow_bloom = 0.15 -glow_blend_mode = 0 -glow_hdr_threshold = 3.29 -glow_bicubic_upscale = true - -[node name="WhiteProjectile" type="KinematicBody2D"] -collision_layer = 8 -collision_mask = 2 -script = ExtResource( 1 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 1 ) - -[node name="WhiteProjectile" type="Sprite" parent="."] -texture = ExtResource( 2 ) - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource( 2 ) diff --git a/magic/projectiles/WhiteProjectile.tscn b/magic/projectiles/WhiteProjectile.tscn deleted file mode 100644 index 5fbf33d..0000000 --- a/magic/projectiles/WhiteProjectile.tscn +++ /dev/null @@ -1,30 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://script/Projectile.gd" type="Script" id=1] -[ext_resource path="res://art/WhiteProjectile.png" type="Texture" id=2] - -[sub_resource type="CircleShape2D" id=1] -radius = 4.0 - -[sub_resource type="Environment" id=2] -background_mode = 4 -glow_enabled = true -glow_intensity = 0.25 -glow_bloom = 0.15 -glow_blend_mode = 0 -glow_hdr_threshold = 3.29 -glow_bicubic_upscale = true - -[node name="WhiteProjectile" type="KinematicBody2D"] -collision_layer = 8 -collision_mask = 2 -script = ExtResource( 1 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource( 1 ) - -[node name="WhiteProjectile" type="Sprite" parent="."] -texture = ExtResource( 2 ) - -[node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource( 2 ) diff --git a/project.godot b/project.godot index 267992f..960899e 100644 --- a/project.godot +++ b/project.godot @@ -23,17 +23,23 @@ _global_script_classes=[ { "class": "StateMachine", "language": "GDScript", "path": "res://script/StateMachine.gd" +}, { +"base": "Sprite", +"class": "Wand", +"language": "GDScript", +"path": "res://WandClass.gd" } ] _global_script_class_icons={ "Collectable": "", "Projectile": "", -"StateMachine": "" +"StateMachine": "", +"Wand": "" } [application] config/name="Gamejam" -run/main_scene="res://Title/Tilte.tscn" +run/main_scene="res://levels/test.tscn" config/icon="res://icon.png" [autoload] @@ -43,6 +49,10 @@ IconLoaderGithub="*res://addons/github-integration/scripts/IconLoaderGithub.gd" RestHandler="*res://addons/github-integration/scripts/RestHandler.gd" Globals="*res://script/globals.gd" +[debug] + +settings/fps/force_fps=60 + [display] window/size/width=320 @@ -78,47 +88,32 @@ texture={ "stream": false, "svg/scale": 1.0 } -wav={ -"compress/mode": 0, -"edit/loop": true, -"edit/normalize": false, -"edit/trim": false, -"force/8_bit": false, -"force/max_rate": false, -"force/max_rate_hz": 44100, -"force/mono": false -} [input] up={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) ] } down={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) ] } left={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) ] } right={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"unicode":0,"echo":false,"script":null) -, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) ] } shoot={ "deadzone": 0.5, -"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) +"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null) ] } inventory={ @@ -129,11 +124,14 @@ inventory={ [layer_names] +2d_render/layer_1="Player" 2d_physics/layer_1="Player" +2d_render/layer_2="World" 2d_physics/layer_2="World" 2d_physics/layer_3="Enemy" 2d_physics/layer_4="Projectiles" [rendering] +quality/driver/fallback_to_gles2=true environment/default_environment="res://default_env.tres" diff --git a/script/Inventory.gd b/script/Inventory.gd index 52581cd..fea1d6b 100644 --- a/script/Inventory.gd +++ b/script/Inventory.gd @@ -72,21 +72,21 @@ func add_item(index): Effect4.visible = true func _on_Conduit1_toggled(): - if Conduit1.is_visible(): + if Conduit1.is_visible() and active_conduit != Globals.Magic[Globals.Conduit1]: active_conduit = Globals.Magic[Globals.Conduit1] parent.WandManager.set_current_conduit(active_conduit) func _on_Conduit2_toggled(): - if Conduit2.is_visible(): + if Conduit2.is_visible() and active_conduit != Globals.Magic[Globals.Conduit2]: active_conduit = Globals.Magic[Globals.Conduit2] parent.WandManager.set_current_conduit(active_conduit) func _on_Conduit3_toggled(): - if Conduit3.is_visible(): + if Conduit3.is_visible() and active_conduit != Globals.Magic[Globals.Conduit3]: active_conduit = Globals.Magic[Globals.Conduit3] parent.WandManager.set_current_conduit(active_conduit) func _on_Conduit4_toggled(): - if Conduit4.is_visible(): + if Conduit4.is_visible() and active_conduit != Globals.Magic[Globals.Conduit4]: active_conduit = Globals.Magic[Globals.Conduit4] parent.WandManager.set_current_conduit(active_conduit) diff --git a/script/globals.gd b/script/globals.gd index 81303dd..4ca8753 100644 --- a/script/globals.gd +++ b/script/globals.gd @@ -12,7 +12,7 @@ var conduit2_ps = preload("res://magic/Wands/TripleWand.tscn") var conduit3_ps = preload("res://magic/Wands/BouncyWand.tscn") var conduit4_ps = preload("res://magic/Wands/PrismWand.tscn") -var projectile1_ps = preload("res://magic/projectiles/Projectile1.tscn") +var projectile1_ps var projectile2_ps var projectile3_ps var projectile4_ps diff --git a/ui/Inventory.png b/ui/Inventory.png index 5f32863..5a4eb37 100644 Binary files a/ui/Inventory.png and b/ui/Inventory.png differ diff --git a/ui/Inventory.tscn b/ui/Inventory.tscn index cf3b58a..568fdbe 100644 --- a/ui/Inventory.tscn +++ b/ui/Inventory.tscn @@ -54,9 +54,10 @@ texture = ExtResource( 1 ) [node name="Conduit1" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 -margin_left = -80.0 -margin_top = -16.0 -margin_right = -66.0 +margin_left = -79.0 +margin_top = -17.9699 +margin_right = -65.0 +margin_bottom = 0.0300903 action_mode = 0 texture_normal = ExtResource( 3 ) expand = true @@ -68,9 +69,9 @@ __meta__ = { [node name="Conduit2" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -58.0 -margin_top = -18.0 +margin_top = -19.0 margin_right = -39.0 -margin_bottom = 4.0 +margin_bottom = 3.0 action_mode = 0 texture_normal = ExtResource( 4 ) expand = true @@ -96,9 +97,9 @@ __meta__ = { [node name="Conduit4" type="TextureButton" parent="Inventory/Conduits"] light_mask = -2147483647 margin_left = -58.0 -margin_top = 7.0 +margin_top = 5.0 margin_right = -40.0 -margin_bottom = 29.0 +margin_bottom = 27.0 action_mode = 0 texture_normal = ExtResource( 6 ) expand = true