parent
fd0e631b1f
commit
f27dd199b8
@ -1,4 +1,5 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=53eecf85_002Dd821_002D40e8_002Dac97_002Dfdb734542b84/@EntryIndexedValue"><Policy><Descriptor Staticness="Instance" AccessRightKinds="Protected, ProtectedInternal, Internal, Public, PrivateProtected" Description="Instance fields (not private)"><ElementKinds><Kind Name="FIELD" /><Kind Name="READONLY_FIELD" /></ElementKinds></Descriptor><Policy Inspect="True" WarnAboutPrefixesAndSuffixes="False" Prefix="" Suffix="" Style="aaBb" /></Policy></s:String>
|
||||
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=0B2502BD29F5EC4798EEFD2950AA7E06/Description/@EntryValue">Godot Signal</s:String>
|
||||
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=0B2502BD29F5EC4798EEFD2950AA7E06/Text/@EntryValue">[Signal]
|
||||
public delegate void $SignalName$EventHandler($END$);</s:String>
|
||||
|
||||
@ -0,0 +1,9 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://bcld43daavmrn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cql8mt5jsmcdl" path="res://scripts/CSharp/Common/Fight/FightSceneSwitcher.cs" id="1_5dt1r"]
|
||||
|
||||
[node name="FightSceneSwitcher" type="Node" node_paths=PackedStringArray("sceneRoot")]
|
||||
script = ExtResource("1_5dt1r")
|
||||
sceneRoot = NodePath("")
|
||||
fightRoomScenePath = "res://scenes/Babushka_scene_fight_world_room.tscn"
|
||||
fightHappeningScene = "res://scenes/Babushka_scene_fight_happening.tscn"
|
||||
@ -0,0 +1,64 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://cpanatqdjjpa3"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/CSharp/Common/FightOld/Fighter.cs" id="1_f3j2x"]
|
||||
[ext_resource type="Texture2D" uid="uid://om2axn1vfa5o" path="res://art/animation/Vesna2D/Vesna Anims Sequences/S01-Idle/0001.png" id="2_2ud32"]
|
||||
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_80knd"]
|
||||
[ext_resource type="AudioStream" uid="uid://ch4c1wh4ghxyo" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Defense_08.wav" id="5_4r2vf"]
|
||||
[ext_resource type="AudioStream" uid="uid://ccionrfr6e3lb" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Attack_04.wav" id="6_u1ayv"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0tqnl"]
|
||||
radius = 291.58
|
||||
|
||||
[node name="VesnaFighter" type="Node2D" node_paths=PackedStringArray("_attackButtons", "_targetButtons", "_targetMarker", "_healthText", "_visualSprite")]
|
||||
script = ExtResource("1_f3j2x")
|
||||
name = "Vesna"
|
||||
maxHealth = 100
|
||||
attackStrength = 10
|
||||
maxActions = null
|
||||
_attackButtons = NodePath("")
|
||||
_targetButtons = NodePath("TargetButtons")
|
||||
_targetMarker = NodePath("TargetButtons/TargetMarker")
|
||||
_healthText = NodePath("HealthShow")
|
||||
_visualSprite = NodePath("Sprite2D")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_2ud32")
|
||||
offset = Vector2(43, -379)
|
||||
|
||||
[node name="TargetButtons" type="Node2D" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="TargetMarker" type="Sprite2D" parent="TargetButtons"]
|
||||
visible = false
|
||||
z_index = 200
|
||||
position = Vector2(8, -122)
|
||||
scale = Vector2(4.245, 4.245)
|
||||
texture = ExtResource("3_80knd")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="TargetButtons"]
|
||||
position = Vector2(3, -76)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetButtons/Area2D"]
|
||||
shape = SubResource("CircleShape2D_0tqnl")
|
||||
|
||||
[node name="HealthShow" type="Label" parent="."]
|
||||
z_index = 200
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -197.0
|
||||
offset_top = -947.0
|
||||
offset_right = 207.0
|
||||
offset_bottom = -801.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_font_sizes/font_size = 106
|
||||
text = "100/100"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HitAudio" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("5_4r2vf")
|
||||
|
||||
[node name="AttackAudio" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("6_u1ayv")
|
||||
@ -1,123 +0,0 @@
|
||||
[gd_scene load_steps=11 format=3 uid="uid://cpanatqdjjpa3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://by88f32fou7lh" path="res://scripts/CSharp/Common/FightOld/Fighter.cs" id="1_f3j2x"]
|
||||
[ext_resource type="Texture2D" uid="uid://om2axn1vfa5o" path="res://art/animation/Vesna2D/Vesna Anims Sequences/S01-Idle/0001.png" id="2_2ud32"]
|
||||
[ext_resource type="Texture2D" uid="uid://qlfwuakhe57t" path="res://art/ui/UI/attack_select_wheel.png" id="3_80knd"]
|
||||
[ext_resource type="AudioStream" uid="uid://ch4c1wh4ghxyo" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Defense_08.wav" id="5_4r2vf"]
|
||||
[ext_resource type="Texture2D" uid="uid://6h85o7fj7gmu" path="res://art/animation/Vesna3D/vesna-more-tools.png" id="5_l04qi"]
|
||||
[ext_resource type="Texture2D" uid="uid://crak7ton4lab0" path="res://art/ui/UI/EmptyFightButton.png" id="5_rjjub"]
|
||||
[ext_resource type="Texture2D" uid="uid://c3wht0nakaki1" path="res://art/ui/UI/icons/icon-fruit-tomatoe.png" id="6_l04qi"]
|
||||
[ext_resource type="AudioStream" uid="uid://ccionrfr6e3lb" path="res://audio/sfx/Battle/Vesna/SFX_Battle_Vesna_Attack_04.wav" id="6_u1ayv"]
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_0tqnl"]
|
||||
radius = 291.58
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_4r2vf"]
|
||||
radius = 173.44
|
||||
|
||||
[node name="VesnaFighter" type="Node2D" node_paths=PackedStringArray("_attackButtons", "_targetButtons", "_targetMarker", "_healthText", "_visualSprite")]
|
||||
script = ExtResource("1_f3j2x")
|
||||
name = "Vesna"
|
||||
maxHealth = 100
|
||||
attackStrength = 10
|
||||
_attackButtons = NodePath("FightButtons")
|
||||
_targetButtons = NodePath("TargetButtons")
|
||||
_targetMarker = NodePath("TargetButtons/TargetMarker")
|
||||
_healthText = NodePath("HealthShow")
|
||||
_visualSprite = NodePath("Sprite2D")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_2ud32")
|
||||
offset = Vector2(43, -379)
|
||||
|
||||
[node name="TargetButtons" type="Node2D" parent="."]
|
||||
visible = false
|
||||
|
||||
[node name="TargetMarker" type="Sprite2D" parent="TargetButtons"]
|
||||
visible = false
|
||||
z_index = 200
|
||||
position = Vector2(8, -122)
|
||||
scale = Vector2(4.245, 4.245)
|
||||
texture = ExtResource("3_80knd")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="TargetButtons"]
|
||||
position = Vector2(3, -76)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="TargetButtons/Area2D"]
|
||||
shape = SubResource("CircleShape2D_0tqnl")
|
||||
|
||||
[node name="FightButtons" type="Node2D" parent="."]
|
||||
position = Vector2(3, -714)
|
||||
|
||||
[node name="CircleBackground" type="Sprite2D" parent="FightButtons"]
|
||||
z_index = 200
|
||||
scale = Vector2(4.245, 4.245)
|
||||
texture = ExtResource("3_80knd")
|
||||
|
||||
[node name="AttackButton" type="Node2D" parent="FightButtons"]
|
||||
position = Vector2(0, -536)
|
||||
|
||||
[node name="ButtonBackground" type="Sprite2D" parent="FightButtons/AttackButton"]
|
||||
z_index = 200
|
||||
scale = Vector2(2.48, 2.48)
|
||||
texture = ExtResource("5_rjjub")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="FightButtons/AttackButton/ButtonBackground"]
|
||||
position = Vector2(6.04839, -10.0806)
|
||||
rotation = -1.0088
|
||||
scale = Vector2(0.249373, 0.25079)
|
||||
texture = ExtResource("5_l04qi")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(291.897, 15.8974, 272.82, 479.385)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="FightButtons/AttackButton"]
|
||||
collision_layer = 16
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="FightButtons/AttackButton/Area2D"]
|
||||
shape = SubResource("CircleShape2D_4r2vf")
|
||||
|
||||
[node name="HealButton" type="Node2D" parent="FightButtons"]
|
||||
position = Vector2(427, -334)
|
||||
|
||||
[node name="ButtonBackground" type="Sprite2D" parent="FightButtons/HealButton"]
|
||||
z_index = 200
|
||||
scale = Vector2(2.48, 2.48)
|
||||
texture = ExtResource("5_rjjub")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="FightButtons/HealButton/ButtonBackground"]
|
||||
position = Vector2(4.83871, 0)
|
||||
scale = Vector2(0.279343, 0.279343)
|
||||
texture = ExtResource("6_l04qi")
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="FightButtons/HealButton"]
|
||||
collision_layer = 16
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="FightButtons/HealButton/Area2D"]
|
||||
shape = SubResource("CircleShape2D_4r2vf")
|
||||
|
||||
[node name="HealthShow" type="Label" parent="."]
|
||||
z_index = 200
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -197.0
|
||||
offset_top = -947.0
|
||||
offset_right = 207.0
|
||||
offset_bottom = -801.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_font_sizes/font_size = 106
|
||||
text = "100/100"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="HitAudio" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("5_4r2vf")
|
||||
|
||||
[node name="AttackAudio" type="AudioStreamPlayer" parent="."]
|
||||
stream = ExtResource("6_u1ayv")
|
||||
|
||||
[connection signal="Attacking" from="." to="AttackAudio" method="play" binds= [0.0]]
|
||||
[connection signal="DamageTaken" from="." to="HitAudio" method="play" binds= [0.0]]
|
||||
[connection signal="input_event" from="FightButtons/AttackButton/Area2D" to="." method="AttackMouseEvent"]
|
||||
[connection signal="input_event" from="FightButtons/HealButton/Area2D" to="." method="HealMouseEvent"]
|
||||
@ -0,0 +1,136 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://cjshlwk8ajpnp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cnhpnn8o0gybd" path="res://scripts/CSharp/Common/Fight/FightHappeningSceneSetup.cs" id="1_fiutj"]
|
||||
[ext_resource type="Script" uid="uid://dwsqst8fhhqlc" path="res://scripts/CSharp/Common/Fight/FighterEntryVisual.cs" id="2_lu4y4"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcld43daavmrn" path="res://prefabs/fight/fight_scene_switcher.tscn" id="2_phrlx"]
|
||||
|
||||
[node name="BabushkaSceneFightHappening" type="Node2D"]
|
||||
|
||||
[node name="Camera2D" type="Camera2D" parent="."]
|
||||
|
||||
[node name="FightSetup" type="Node2D" parent="."]
|
||||
script = ExtResource("1_fiutj")
|
||||
|
||||
[node name="FightVisuals" type="Node2D" parent="."]
|
||||
position = Vector2(0, 259)
|
||||
script = ExtResource("2_lu4y4")
|
||||
|
||||
[node name="AllyFighters" type="Node2D" parent="FightVisuals"]
|
||||
|
||||
[node name="EnemyFighters" type="Node2D" parent="FightVisuals"]
|
||||
|
||||
[node name="EnvironmentVisuals" type="Node2D" parent="."]
|
||||
|
||||
[node name="FightSceneSwitcher" parent="." instance=ExtResource("2_phrlx")]
|
||||
|
||||
[node name="ActionSelect" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="BottomPanel" type="Control" parent="ActionSelect"]
|
||||
custom_minimum_size = Vector2(0, 200)
|
||||
layout_mode = 3
|
||||
anchors_preset = 12
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
size_flags_vertical = 8
|
||||
|
||||
[node name="background" type="ColorRect" parent="ActionSelect/BottomPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(1, 1, 1, 0.27451)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="ActionSelect/BottomPanel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 200
|
||||
theme_override_constants/margin_right = 200
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="AttackButton" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "Attack"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="Summon Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "Summon"
|
||||
|
||||
[node name="MarginContainer3" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="Talk Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer3"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "Talk"
|
||||
|
||||
[node name="MarginContainer4" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="Flee Button" type="Button" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer/HBoxContainer/MarginContainer4"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "Flee"
|
||||
|
||||
[node name="MarginContainer2" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/margin_left = 200
|
||||
theme_override_constants/margin_right = 200
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2"]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 10
|
||||
theme_override_constants/margin_top = 10
|
||||
theme_override_constants/margin_right = 10
|
||||
theme_override_constants/margin_bottom = 10
|
||||
|
||||
[node name="Label" type="Label" parent="ActionSelect/BottomPanel/VBoxContainer/MarginContainer2/MarginContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 41
|
||||
text = "This text explains the currently hovered button"
|
||||
@ -0,0 +1,34 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using Babushka.scripts.CSharp.Common.Fight;
|
||||
|
||||
public partial class AllFightersVisual : Node
|
||||
{
|
||||
[Export] private Node2D _allyFighters;
|
||||
[Export] private Node2D _enemyFighters;
|
||||
|
||||
[Export] private PackedScene _blobFighterVisual;
|
||||
[Export] private PackedScene _bigBlobFighterVisual;
|
||||
[Export] private PackedScene _mavkaFighterVisual;
|
||||
[Export] private PackedScene _yourMomFighterVisual;
|
||||
[Export] private PackedScene _vesnaFighterVisual;
|
||||
|
||||
public void EnterFighter(FightWorld.Fighter fighter, bool isEnemy)
|
||||
{
|
||||
var parent = isEnemy ? _enemyFighters : _allyFighters;
|
||||
|
||||
var packedScene = fighter.type switch
|
||||
{
|
||||
FightWorld.Fighter.Type.Blob => _blobFighterVisual,
|
||||
FightWorld.Fighter.Type.BigBlob => _bigBlobFighterVisual,
|
||||
FightWorld.Fighter.Type.Mavka => _mavkaFighterVisual,
|
||||
FightWorld.Fighter.Type.YourMom => _yourMomFighterVisual,
|
||||
FightWorld.Fighter.Type.Vesna => _vesnaFighterVisual,
|
||||
_ => throw new ArgumentOutOfRangeException()
|
||||
};
|
||||
|
||||
var fighterVisual = packedScene.Instantiate<FighterVisual>();
|
||||
fighterVisual.Initialize(fighter);
|
||||
parent.AddChild(fighterVisual);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
uid://dwsqst8fhhqlc
|
||||
@ -0,0 +1,15 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Babushka.scripts.CSharp.Common.Fight;
|
||||
|
||||
public partial class FightHappeningSceneSetup : Node2D
|
||||
{
|
||||
public override void _Ready()
|
||||
{
|
||||
var fightHappening = FightWorld.Instance.fightHappeningData;
|
||||
Debug.Assert(fightHappening != null, "Fight happening scene loaded, without a fight happening");
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
uid://cnhpnn8o0gybd
|
||||
@ -0,0 +1 @@
|
||||
uid://beuhpltb84pf
|
||||
@ -1 +0,0 @@
|
||||
uid://oe1uypehqvr7
|
||||
Loading…
Reference in new issue