diff --git a/Scenes/Characters/Capricorn/CapricornP1.tscn b/Scenes/Characters/Capricorn/CapricornP1.tscn index c4e8378..74637f9 100644 --- a/Scenes/Characters/Capricorn/CapricornP1.tscn +++ b/Scenes/Characters/Capricorn/CapricornP1.tscn @@ -212,7 +212,7 @@ animations = [{ [sub_resource type="BoxShape3D" id="BoxShape3D_r4spg"] size = Vector3(1, 5, 1) -[node name="Capricorn" type="CharacterBody3D" groups=["Player"]] +[node name="CapricornP1" type="CharacterBody3D" groups=["Player"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0) script = ExtResource("1_rngpf") diff --git a/Scenes/Characters/Capricorn/CapricornP2.tscn b/Scenes/Characters/Capricorn/CapricornP2.tscn index 118a5d6..bd1b966 100644 --- a/Scenes/Characters/Capricorn/CapricornP2.tscn +++ b/Scenes/Characters/Capricorn/CapricornP2.tscn @@ -215,7 +215,7 @@ size = Vector3(1, 1.04415, 1) [sub_resource type="BoxShape3D" id="BoxShape3D_yilru"] size = Vector3(1, 5, 1) -[node name="Capricorn" type="CharacterBody3D" groups=["Player"]] +[node name="CapricornP2" type="CharacterBody3D" groups=["Player"]] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0) script = ExtResource("1_iu20s") diff --git a/Scenes/Characters/P1Megami.tscn b/Scenes/Characters/P1Megami.tscn index f31b7fe..4dbfb42 100644 --- a/Scenes/Characters/P1Megami.tscn +++ b/Scenes/Characters/P1Megami.tscn @@ -599,7 +599,7 @@ _surfaces = [{ blend_shape_mode = 0 shadow_mesh = SubResource("ArrayMesh_htkik") -[node name="Megami" type="CharacterBody3D" groups=["Player"]] +[node name="MegamiP1" type="CharacterBody3D" groups=["Player"]] script = ExtResource("1_ah2xl") [node name="CollisionShape3D" type="CollisionShape3D" parent="."] diff --git a/Scenes/Characters/P1PiscesWitch.tscn b/Scenes/Characters/P1PiscesWitch.tscn index 53a9d76..8c8259b 100644 --- a/Scenes/Characters/P1PiscesWitch.tscn +++ b/Scenes/Characters/P1PiscesWitch.tscn @@ -12,7 +12,7 @@ size = Vector3(3.04879, 3.92906, 2.56521) radius = 0.704872 height = 1.67894 -[node name="Pisces" type="CharacterBody3D" groups=["Player"]] +[node name="PiscesP1" type="CharacterBody3D" groups=["Player"]] transform = Transform3D(0.33, 0, 0, 0, 0.33, 0, 0, 0, 0.33, 0, 0, 0) script = ExtResource("1_ug7pg") _fireProjectile = ExtResource("2_y0wmm") diff --git a/Scenes/Characters/P1PlayerScorpio.tscn b/Scenes/Characters/P1PlayerScorpio.tscn index 8eeec55..5dfe5c5 100644 --- a/Scenes/Characters/P1PlayerScorpio.tscn +++ b/Scenes/Characters/P1PlayerScorpio.tscn @@ -11,7 +11,7 @@ size = Vector3(0.822782, 0.527059, 0.80108) [sub_resource type="BoxShape3D" id="BoxShape3D_f8aaj"] size = Vector3(0.822782, 0.527059, 0.80108) -[node name="PlayerScorpio" type="CharacterBody3D" groups=["Player"]] +[node name="ScorpioP1" type="CharacterBody3D" groups=["Player"]] script = ExtResource("1_mn5ui") _fireProjectile = ExtResource("2_uayjr") _altFireProjectile = ExtResource("3_tw078") diff --git a/Scenes/Characters/P2Megami.tscn b/Scenes/Characters/P2Megami.tscn index d79887a..2565f87 100644 --- a/Scenes/Characters/P2Megami.tscn +++ b/Scenes/Characters/P2Megami.tscn @@ -1,12 +1,23 @@ -[gd_scene load_steps=27 format=3 uid="uid://dk65etf7r8bm6"] +[gd_scene load_steps=29 format=3 uid="uid://dk65etf7r8bm6"] [ext_resource type="Script" path="res://Scripts/Character2.cs" id="1_eg082"] +[ext_resource type="Shader" path="res://Scenes/Characters/P2Megami2.gdshader" id="2_4sjch"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_lwhu3"] +render_priority = 0 +shader = ExtResource("2_4sjch") +shader_parameter/albedo = null +shader_parameter/specular = null +shader_parameter/metallic = null +shader_parameter/roughness = null +shader_parameter/uv1_scale = null +shader_parameter/uv1_offset = null [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_4qqwi"] resource_name = "Material.006" +next_pass = SubResource("ShaderMaterial_lwhu3") cull_mode = 2 vertex_color_use_as_albedo = true -albedo_color = Color(0.899732, 0.906332, 0.700897, 1) roughness = 0.5 [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a11nm"] @@ -602,7 +613,7 @@ size = Vector3(0.822782, 0.527059, 0.80108) [sub_resource type="BoxShape3D" id="BoxShape3D_lo3oj"] size = Vector3(1.19222, 2.13872, 1.37879) -[node name="Megami" type="CharacterBody3D"] +[node name="MegamiP2" type="CharacterBody3D"] script = ExtResource("1_eg082") [node name="Pivot" type="Node3D" parent="."] diff --git a/Scenes/Characters/P2Megami2.gdshader b/Scenes/Characters/P2Megami2.gdshader new file mode 100644 index 0000000..34a1cb4 --- /dev/null +++ b/Scenes/Characters/P2Megami2.gdshader @@ -0,0 +1,43 @@ +shader_type spatial; + +// Simplified Godot spatial shader uniforms and settings: +render_mode blend_mix,depth_draw_opaque,cull_back,diffuse_burley,specular_schlick_ggx; +uniform vec4 albedo : source_color; +uniform float specular; +uniform float metallic; +uniform float roughness : hint_range(0,1); +uniform vec3 uv1_scale; +uniform vec3 uv1_offset; + +// The texture to use as a color mask. +// For these examples, it will be the ColorMask viewport texture. +uniform sampler2D mask_texture : hint_default_black; + + +// Godot generated code: +// It scales and offsets the UV vector by the inputted uniforms. +void vertex() { + UV=UV*uv1_scale.xy+uv1_offset.xy; +} + + +void fragment() { + // Simplified Godot spatial shader code: + vec2 base_uv = UV; + METALLIC = metallic; + ROUGHNESS = roughness; + SPECULAR = specular; + + // Everything below this line is the color masking code! + // + // First, get the pixel from the mask texture at the screen UV position. This will give the pixel at this fragment position + // relative to the screen, and since the ColorMask viewport is synced with the main screen/viewport, we can use this to get + // the pixel at the correct position in the ColorMask viewport. + vec4 mask_pixel = texture(mask_texture, SCREEN_UV); + // Because we know the ColorMask is going to be black/white, we can simply check if the pixel returned is over 0.9. + // If it is, then change the output ALBEDO color to red. + if (mask_pixel.r >= 0.9) + { + ALBEDO = vec3(1,0,0); + } +} \ No newline at end of file diff --git a/Scenes/Characters/P2PiscesWitch.tscn b/Scenes/Characters/P2PiscesWitch.tscn index 61ca4d6..c7efdb0 100644 --- a/Scenes/Characters/P2PiscesWitch.tscn +++ b/Scenes/Characters/P2PiscesWitch.tscn @@ -12,7 +12,7 @@ size = Vector3(3.04879, 3.92906, 2.56521) radius = 0.704872 height = 1.67894 -[node name="Pisces" type="CharacterBody3D" groups=["Player"]] +[node name="PiscesP2" type="CharacterBody3D" groups=["Player"]] transform = Transform3D(0.33, 0, 0, 0, 0.33, 0, 0, 0, 0.33, 0, 0, 0) script = ExtResource("1_n3jg5") _fireProjectile = ExtResource("2_gw1od") diff --git a/Scenes/Characters/P2PlayerScorpio.tscn b/Scenes/Characters/P2PlayerScorpio.tscn index 69124ff..e8cfd27 100644 --- a/Scenes/Characters/P2PlayerScorpio.tscn +++ b/Scenes/Characters/P2PlayerScorpio.tscn @@ -11,7 +11,7 @@ size = Vector3(0.822782, 0.527059, 0.80108) [sub_resource type="BoxShape3D" id="BoxShape3D_f8aaj"] size = Vector3(0.822782, 0.527059, 0.80108) -[node name="PlayerScorpio" type="CharacterBody3D" groups=["Player"]] +[node name="ScorpioP2" type="CharacterBody3D" groups=["Player"]] script = ExtResource("1_5q5l0") _fireProjectile = ExtResource("2_iw8b0") _altFireProjectile = ExtResource("3_61xde") diff --git a/Scenes/GameManager.tscn b/Scenes/GameManager.tscn index 7219cef..df20ad9 100644 --- a/Scenes/GameManager.tscn +++ b/Scenes/GameManager.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_ya2kt"] [ext_resource type="PackedScene" uid="uid://xcmspevaqcrc" path="res://Scenes/Player1.tscn" id="4_3fl70"] -[ext_resource type="PackedScene" uid="uid://dq1gtd55p04do" path="res://Scenes/StageGUI.tscn" id="5_gsh7q"] +[ext_resource type="PackedScene" uid="uid://dq1gtd55p04do" path="res://Scenes/StageGUI.tscn" id="4_xi0i5"] [ext_resource type="PackedScene" uid="uid://jircpua5fl80" path="res://Scenes/Player2.tscn" id="8_sixv3"] [node name="GameManager" type="Node3D"] @@ -15,16 +15,10 @@ projection = 1 current = true size = 10.8546 -[node name="StageGUI" parent="." instance=ExtResource("5_gsh7q")] -offset_left = 0.0 -offset_top = 0.0 -offset_right = 0.0 -offset_bottom = 0.0 -size_flags_horizontal = 4 -size_flags_vertical = 4 - [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] transform = Transform3D(1, 0, 0, 0, -0.504317, 0.863519, 0, -0.863519, -0.504317, 0, 19.9508, 0) +[node name="StageGUI" parent="." instance=ExtResource("4_xi0i5")] + [connection signal="ReselectCharacter" from="." to="StageGUI" method="OnCharacterSelect"] [connection signal="OnCharacterSelectionMade" from="StageGUI" to="." method="OnCharacterSelected"] diff --git a/Scenes/StageGUI.tscn b/Scenes/StageGUI.tscn index 75436a0..36bb9c0 100644 --- a/Scenes/StageGUI.tscn +++ b/Scenes/StageGUI.tscn @@ -1,16 +1,12 @@ -[gd_scene load_steps=6 format=3 uid="uid://dq1gtd55p04do"] +[gd_scene load_steps=8 format=3 uid="uid://dq1gtd55p04do"] [ext_resource type="Script" path="res://Scripts/StageGUI.cs" id="1_wr2m0"] -[ext_resource type="Texture2D" uid="uid://2vog2nty4qrj" path="res://Textures/wheel.png" id="4_3jyfi"] +[ext_resource type="Script" path="res://Scripts/CharacterSelectUpdateService.cs" id="3_5iw21"] +[ext_resource type="Texture2D" uid="uid://5fnvx1dxl85g" path="res://Textures/Portraits/cap-bg.png" id="3_o2fah"] +[ext_resource type="Texture2D" uid="uid://d237k682uasn0" path="res://Textures/Portraits/pisces-bg.png" id="4_df6a8"] [ext_resource type="Texture2D" uid="uid://fqmkmpmackem" path="res://Textures/Portraits/character-BACKGROUND-ONLY.png" id="4_xa2n6"] - -[sub_resource type="Animation" id="Animation_ptfpl"] -resource_name = "Rollover" - -[sub_resource type="AnimationLibrary" id="AnimationLibrary_05shj"] -_data = { -"Rollover": SubResource("Animation_ptfpl") -} +[ext_resource type="Texture2D" uid="uid://dqukqw3vwfrog" path="res://Textures/Portraits/sag-bg.png" id="5_k6b7h"] +[ext_resource type="Texture2D" uid="uid://d0yx2qyi7dfkp" path="res://Textures/Portraits/scorpio-bg.png" id="6_vgqeh"] [node name="StageGUI" type="Control"] process_mode = 3 @@ -18,10 +14,6 @@ layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_left = -59.0 -offset_top = -36.0 -offset_right = -59.0 -offset_bottom = -36.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("1_wr2m0") @@ -37,9 +29,8 @@ offset_right = 420.0 offset_bottom = 540.0 grow_vertical = 2 texture = ExtResource("4_xa2n6") -stretch_mode = 2 -[node name="SidebarLeft2" type="TextureRect" parent="."] +[node name="SidebarRight" type="TextureRect" parent="."] layout_mode = 1 anchors_preset = 6 anchor_left = 1.0 @@ -54,34 +45,155 @@ grow_vertical = 2 texture = ExtResource("4_xa2n6") [node name="CharacterSelect" type="Control" parent="."] +process_mode = 3 layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("3_5iw21") -[node name="AnimationPlayer" type="AnimationPlayer" parent="CharacterSelect"] -libraries = { -"": SubResource("AnimationLibrary_05shj") -} +[node name="P1" type="Control" parent="CharacterSelect"] +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -20.0 +offset_right = 40.0 +offset_bottom = 20.0 +grow_vertical = 2 -[node name="Wheel" type="TextureRect" parent="CharacterSelect"] +[node name="CapBG" type="TextureRect" parent="CharacterSelect/P1"] visible = false -layout_mode = 0 -offset_left = 48.0 -offset_top = 71.0 -offset_right = 349.0 -offset_bottom = 386.0 -texture = ExtResource("4_3jyfi") -expand_mode = 1 +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -540.0 +offset_right = 420.0 +offset_bottom = 540.0 +grow_vertical = 2 +texture = ExtResource("3_o2fah") +stretch_mode = 2 -[node name="Wheel2" type="TextureRect" parent="CharacterSelect"] +[node name="PiscesBG" type="TextureRect" parent="CharacterSelect/P1"] visible = false -layout_mode = 0 -offset_left = 1570.0 -offset_top = 84.0 -offset_right = 1871.0 -offset_bottom = 399.0 -texture = ExtResource("4_3jyfi") -expand_mode = 1 +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -540.0 +offset_right = 420.0 +offset_bottom = 540.0 +grow_vertical = 2 +texture = ExtResource("4_df6a8") +stretch_mode = 2 + +[node name="SagBG" type="TextureRect" parent="CharacterSelect/P1"] +visible = false +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -540.0 +offset_right = 420.0 +offset_bottom = 540.0 +grow_vertical = 2 +texture = ExtResource("5_k6b7h") +stretch_mode = 2 + +[node name="ScorpioBG" type="TextureRect" parent="CharacterSelect/P1"] +visible = false +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -540.0 +offset_right = 420.0 +offset_bottom = 540.0 +grow_vertical = 2 +texture = ExtResource("6_vgqeh") +stretch_mode = 2 + +[node name="P2" type="Control" parent="CharacterSelect"] +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -40.0 +offset_top = -20.0 +offset_bottom = 20.0 +grow_horizontal = 0 +grow_vertical = 2 + +[node name="CapBG" type="TextureRect" parent="CharacterSelect/P2"] +visible = false +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -420.0 +offset_top = -540.0 +offset_bottom = 540.0 +grow_horizontal = 0 +grow_vertical = 2 +texture = ExtResource("3_o2fah") + +[node name="PiscesBG" type="TextureRect" parent="CharacterSelect/P2"] +visible = false +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -420.0 +offset_top = -540.0 +offset_bottom = 540.0 +grow_horizontal = 0 +grow_vertical = 2 +texture = ExtResource("4_df6a8") + +[node name="SagBG" type="TextureRect" parent="CharacterSelect/P2"] +visible = false +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -420.0 +offset_top = -540.0 +offset_bottom = 540.0 +grow_horizontal = 0 +grow_vertical = 2 +texture = ExtResource("5_k6b7h") + +[node name="ScorpioBG" type="TextureRect" parent="CharacterSelect/P2"] +visible = false +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -420.0 +offset_top = -540.0 +offset_bottom = 540.0 +grow_horizontal = 0 +grow_vertical = 2 +texture = ExtResource("6_vgqeh") + +[connection signal="CapricornP1Selected" from="." to="CharacterSelect" method="OnCapricornP1Selected"] +[connection signal="CapricornP2Selected" from="." to="CharacterSelect" method="OnCapricornP2Selected"] +[connection signal="PiscesP1Selected" from="." to="CharacterSelect" method="OnPiscesP1Selected"] +[connection signal="PiscesP2Selected" from="." to="CharacterSelect" method="OnPiscesP2Selected"] +[connection signal="SagP1Selected" from="." to="CharacterSelect" method="OnSagP1Selected"] +[connection signal="SagP2Selected" from="." to="CharacterSelect" method="OnSagP2Selected"] +[connection signal="ScorpioP1Selected" from="." to="CharacterSelect" method="OnScorpioP1Selected"] +[connection signal="ScorpioP2Selected" from="." to="CharacterSelect" method="OnScorpioP2Selected"] diff --git a/Scenes/character-BACKGROUND-ONLY.png b/Scenes/character-BACKGROUND-ONLY.png deleted file mode 100644 index edf28c1..0000000 Binary files a/Scenes/character-BACKGROUND-ONLY.png and /dev/null differ diff --git a/Scripts/CharacterSelectUpdateService.cs b/Scripts/CharacterSelectUpdateService.cs new file mode 100644 index 0000000..fa71e2e --- /dev/null +++ b/Scripts/CharacterSelectUpdateService.cs @@ -0,0 +1,89 @@ +using Godot; +using System.Linq; + +public partial class CharacterSelectUpdateService : Control +{ + public override void _Ready() + { + base._Ready(); + } + public void OnCapricornP1Selected() + { + var allPortraits = GetNode("P1").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P1/CapBG"); + node.Show(); + } + + public void OnPiscesP1Selected() + { + var allPortraits = GetNode("P1").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P1/PiscesBG"); + node.Show(); + } + + public void OnSagP1Selected() + { + var allPortraits = GetNode("P1").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P1/SagBG"); + node.Show(); + } + + public void OnScorpioP1Selected() + { + var allPortraits = GetNode("P1").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P1/ScorpioBG"); + node.Show(); + } + + public void OnCapricornP2Selected() + { + var allPortraits = GetNode("P2").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P2/CapBG"); + node.Show(); + } + + public void OnPiscesP2Selected() + { + var allPortraits = GetNode("P2").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P2/PiscesBG"); + node.Show(); + } + + public void OnSagP2Selected() + { + var allPortraits = GetNode("P2").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P2/SagBG"); + node.Show(); + } + + public void OnScorpioP2Selected() + { + var allPortraits = GetNode("P2").GetChildren().OfType(); + foreach (var bg in allPortraits) + bg.Hide(); + + var node = GetNode("P2/ScorpioBG"); + node.Show(); + } +} diff --git a/Scripts/StageGUI.cs b/Scripts/StageGUI.cs index 7c83427..f15d44a 100644 --- a/Scripts/StageGUI.cs +++ b/Scripts/StageGUI.cs @@ -6,6 +6,22 @@ public partial class StageGUI : Control { [Signal] public delegate void OnCharacterSelectionMadeEventHandler(Player player); + [Signal] + public delegate void CapricornP1SelectedEventHandler(); + [Signal] + public delegate void CapricornP2SelectedEventHandler(); + [Signal] + public delegate void PiscesP1SelectedEventHandler(); + [Signal] + public delegate void PiscesP2SelectedEventHandler(); + [Signal] + public delegate void SagP1SelectedEventHandler(); + [Signal] + public delegate void SagP2SelectedEventHandler(); + [Signal] + public delegate void ScorpioP1SelectedEventHandler(); + [Signal] + public delegate void ScorpioP2SelectedEventHandler(); private GameManager _gameManager; @@ -19,20 +35,6 @@ public partial class StageGUI : Control if (player.GameOver) return; - if (player == _gameManager.Players.ElementAt(0)) - { - var wheel1 = GetNode("CharacterSelect/Wheel"); - wheel1.FocusMode = FocusModeEnum.All; - wheel1.GrabFocus(); - wheel1.Visible = true; - } - else if (player == _gameManager.Players.ElementAt(1)) - { - var wheel2 = GetNode("CharacterSelect/Wheel2"); - wheel2.FocusMode = FocusModeEnum.All; - wheel2.GrabFocus(); - wheel2.Visible = true; - } player.IsSelectingCharacter = true; } @@ -41,16 +43,20 @@ public partial class StageGUI : Control if (_gameManager.Players.ElementAt(0).IsSelectingCharacter) { if (Input.IsActionJustPressed("p1_right")) + { _gameManager.SetToNextCharacter(_gameManager.Players.ElementAt(0)); + ChangeBG(_gameManager.Players.ElementAt(0)); + } if (Input.IsActionJustPressed("p1_left")) + { _gameManager.SetToPreviousCharacter(_gameManager.Players.ElementAt(0)); + ChangeBG(_gameManager.Players.ElementAt(0)); + } if (Input.IsActionJustPressed("p1_fire")) { GD.Print("Selected character"); _gameManager.Players.ElementAt(0).IsSelectingCharacter = false; - var wheel1 = GetNode("CharacterSelect/Wheel"); - wheel1.Hide(); EmitSignal(SignalName.OnCharacterSelectionMade, _gameManager.Players.ElementAt(0)); GetTree().Paused = false; } @@ -59,22 +65,61 @@ public partial class StageGUI : Control if (_gameManager.Players.Count() == 2 && _gameManager.Players.ElementAt(0).IsSelectingCharacter) { if (Input.IsActionJustPressed("p2_right")) + { _gameManager.SetToNextCharacter(_gameManager.Players.ElementAt(1)); + ChangeBG(_gameManager.Players.ElementAt(1)); + } if (Input.IsActionJustPressed("p2_left")) + { _gameManager.SetToPreviousCharacter(_gameManager.Players.ElementAt(1)); + ChangeBG(_gameManager.Players.ElementAt(1)); + } if (Input.IsActionJustPressed("p2_fire")) { GD.Print("Selected character"); _gameManager.Players.ElementAt(1).IsSelectingCharacter = false; - var wheel2 = GetNode("CharacterSelect/Wheel2"); - wheel2.Hide(); EmitSignal(SignalName.OnCharacterSelectionMade, _gameManager.Players.ElementAt(1)); GetTree().Paused = false; } } } + private void ChangeBG(Player player) + { + var name = player.CharactersLeftOnStage.ElementAt(player._characterIndex).Name; + GD.Print(name); + switch (name) + { + case "CapricornP1": + EmitSignal(SignalName.CapricornP1Selected); + break; + case "CapricornP2": + EmitSignal(SignalName.CapricornP2Selected); + break; + case "ScorpioP1": + EmitSignal(SignalName.ScorpioP1Selected); + break; + case "ScorpioP2": + EmitSignal(SignalName.ScorpioP2Selected); + break; + case "PiscesP1": + EmitSignal(SignalName.PiscesP1Selected); + break; + case "PiscesP2": + EmitSignal(SignalName.PiscesP2Selected); + break; + case "MegamiP1": + EmitSignal(SignalName.SagP1Selected); + break; + case "MegamiP2": + EmitSignal(SignalName.SagP2Selected); + break; + default: + break; + } + } + private void OnFirstPlayerCharacterSelect() { var player = _gameManager.Players.ElementAt(0); diff --git a/Textures/Portraits/Pisces.jpg b/Textures/Portraits/Pisces.jpg deleted file mode 100644 index c23175c..0000000 Binary files a/Textures/Portraits/Pisces.jpg and /dev/null differ diff --git a/Textures/Portraits/cap-bg.png b/Textures/Portraits/cap-bg.png new file mode 100644 index 0000000..6e64211 Binary files /dev/null and b/Textures/Portraits/cap-bg.png differ diff --git a/Textures/Portraits/Pisces.jpg.import b/Textures/Portraits/cap-bg.png.import similarity index 68% rename from Textures/Portraits/Pisces.jpg.import rename to Textures/Portraits/cap-bg.png.import index 8463e1c..010cc7d 100644 --- a/Textures/Portraits/Pisces.jpg.import +++ b/Textures/Portraits/cap-bg.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dieoh0r7a5try" -path="res://.godot/imported/Pisces.jpg-c351c8459f4e19b9a85580584007606d.ctex" +uid="uid://5fnvx1dxl85g" +path="res://.godot/imported/cap-bg.png-cbf621e62e3e016f6ddecbdbdf933822.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Textures/Portraits/Pisces.jpg" -dest_files=["res://.godot/imported/Pisces.jpg-c351c8459f4e19b9a85580584007606d.ctex"] +source_file="res://Textures/Portraits/cap-bg.png" +dest_files=["res://.godot/imported/cap-bg.png-cbf621e62e3e016f6ddecbdbdf933822.ctex"] [params] diff --git a/Textures/Portraits/cap-ds.png b/Textures/Portraits/cap-ds.png new file mode 100644 index 0000000..f485de2 Binary files /dev/null and b/Textures/Portraits/cap-ds.png differ diff --git a/Scenes/character-BACKGROUND-ONLY.png.import b/Textures/Portraits/cap-ds.png.import similarity index 65% rename from Scenes/character-BACKGROUND-ONLY.png.import rename to Textures/Portraits/cap-ds.png.import index e9b4b3d..616f050 100644 --- a/Scenes/character-BACKGROUND-ONLY.png.import +++ b/Textures/Portraits/cap-ds.png.import @@ -2,16 +2,16 @@ importer="texture" type="CompressedTexture2D" -uid="uid://dhn08vs88telq" -path="res://.godot/imported/character-BACKGROUND-ONLY.png-ae42ea0737fd64304b94cb0c74945024.ctex" +uid="uid://bonbx52mn8wu0" +path="res://.godot/imported/cap-ds.png-a3c33063acd2195ba1a2265f00b8a8f2.ctex" metadata={ "vram_texture": false } [deps] -source_file="res://Scenes/character-BACKGROUND-ONLY.png" -dest_files=["res://.godot/imported/character-BACKGROUND-ONLY.png-ae42ea0737fd64304b94cb0c74945024.ctex"] +source_file="res://Textures/Portraits/cap-ds.png" +dest_files=["res://.godot/imported/cap-ds.png-a3c33063acd2195ba1a2265f00b8a8f2.ctex"] [params] diff --git a/Textures/Portraits/pisces-bg.png b/Textures/Portraits/pisces-bg.png new file mode 100644 index 0000000..b289eeb Binary files /dev/null and b/Textures/Portraits/pisces-bg.png differ diff --git a/Textures/Portraits/pisces-bg.png.import b/Textures/Portraits/pisces-bg.png.import new file mode 100644 index 0000000..5397034 --- /dev/null +++ b/Textures/Portraits/pisces-bg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d237k682uasn0" +path="res://.godot/imported/pisces-bg.png-d20dec6dfc3f81a10785950b6d2e1b9f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/pisces-bg.png" +dest_files=["res://.godot/imported/pisces-bg.png-d20dec6dfc3f81a10785950b6d2e1b9f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Portraits/pisces-ds.png b/Textures/Portraits/pisces-ds.png new file mode 100644 index 0000000..37e6f0a Binary files /dev/null and b/Textures/Portraits/pisces-ds.png differ diff --git a/Textures/Portraits/pisces-ds.png.import b/Textures/Portraits/pisces-ds.png.import new file mode 100644 index 0000000..c491f29 --- /dev/null +++ b/Textures/Portraits/pisces-ds.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://db7170nxtgxbf" +path="res://.godot/imported/pisces-ds.png-a129bd367e02abaf1f5b2d756d25589e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/pisces-ds.png" +dest_files=["res://.godot/imported/pisces-ds.png-a129bd367e02abaf1f5b2d756d25589e.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Portraits/sag-bg.png b/Textures/Portraits/sag-bg.png new file mode 100644 index 0000000..1baba63 Binary files /dev/null and b/Textures/Portraits/sag-bg.png differ diff --git a/Textures/Portraits/sag-bg.png.import b/Textures/Portraits/sag-bg.png.import new file mode 100644 index 0000000..8cd3263 --- /dev/null +++ b/Textures/Portraits/sag-bg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dqukqw3vwfrog" +path="res://.godot/imported/sag-bg.png-c1de29df1b78e2dec462ff4fa52094c1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/sag-bg.png" +dest_files=["res://.godot/imported/sag-bg.png-c1de29df1b78e2dec462ff4fa52094c1.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Portraits/sag-ds.png b/Textures/Portraits/sag-ds.png new file mode 100644 index 0000000..3e21e98 Binary files /dev/null and b/Textures/Portraits/sag-ds.png differ diff --git a/Textures/Portraits/sag-ds.png.import b/Textures/Portraits/sag-ds.png.import new file mode 100644 index 0000000..825a2a5 --- /dev/null +++ b/Textures/Portraits/sag-ds.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dassgd734u0tb" +path="res://.godot/imported/sag-ds.png-ce152f7dc8b7442a468f5603c73b7557.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/sag-ds.png" +dest_files=["res://.godot/imported/sag-ds.png-ce152f7dc8b7442a468f5603c73b7557.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Portraits/scorpio-bg.png b/Textures/Portraits/scorpio-bg.png new file mode 100644 index 0000000..962691a Binary files /dev/null and b/Textures/Portraits/scorpio-bg.png differ diff --git a/Textures/Portraits/scorpio-bg.png.import b/Textures/Portraits/scorpio-bg.png.import new file mode 100644 index 0000000..671bb15 --- /dev/null +++ b/Textures/Portraits/scorpio-bg.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d0yx2qyi7dfkp" +path="res://.godot/imported/scorpio-bg.png-4813fac4e4cd55ea11c99541dd9b45bd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/scorpio-bg.png" +dest_files=["res://.godot/imported/scorpio-bg.png-4813fac4e4cd55ea11c99541dd9b45bd.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/Textures/Portraits/scorpio-ds.png b/Textures/Portraits/scorpio-ds.png new file mode 100644 index 0000000..3cd1efc Binary files /dev/null and b/Textures/Portraits/scorpio-ds.png differ diff --git a/Textures/Portraits/scorpio-ds.png.import b/Textures/Portraits/scorpio-ds.png.import new file mode 100644 index 0000000..b4a0bb2 --- /dev/null +++ b/Textures/Portraits/scorpio-ds.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bxqectptf78n8" +path="res://.godot/imported/scorpio-ds.png-ebc2af3f089f1e11051ab18fcbfe0bb0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Textures/Portraits/scorpio-ds.png" +dest_files=["res://.godot/imported/scorpio-ds.png-ebc2af3f089f1e11051ab18fcbfe0bb0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1