🎨 Live review changes

pull/22/head
jonathan 2 months ago
parent 83dc6bfd56
commit 21b361f9d7

@ -6,7 +6,7 @@ public class TargetSelectActionDetail : FighterAction.FighterActionDetail
{ {
public enum VisualRange public enum VisualRange
{ {
Single Single
} }
// settings // settings

@ -14,6 +14,7 @@ public partial class AllFightersVisual : Node
[Export] private Node2D _enemyFighters = null!; [Export] private Node2D _enemyFighters = null!;
// TODO: move type to prefab mapping to Resource
[ExportCategory("Fighter Visual Scenes")] [ExportCategory("Fighter Visual Scenes")]
[Export] private PackedScene _blobFighterVisual = null!; [Export] private PackedScene _blobFighterVisual = null!;
[Export] private PackedScene _bigBlobFighterVisual = null!; [Export] private PackedScene _bigBlobFighterVisual = null!;
@ -112,6 +113,7 @@ public partial class AllFightersVisual : Node
private void ShowTargetSelect(TargetSelectActionDetail targetDetail) private void ShowTargetSelect(TargetSelectActionDetail targetDetail)
{ {
// TODO: use Event bus
if (targetDetail.selectEnemy) if (targetDetail.selectEnemy)
_fighterVisuals _fighterVisuals
.Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation)) .Where(kv => kv.Key.IsInFormation(HappeningData.enemyFighterFormation))

@ -32,7 +32,7 @@ public partial class FightSceneSwitcher : Node
public void SwitchRoom(int pathIndex) public void SwitchRoom(int pathIndex)
{ {
Debug.Assert(FightWorld.Instance.currentRoom != null, "FightWorld.Instance.currentRoom!=null"); Debug.Assert(FightWorld.Instance.currentRoom != null, "FightWorld.Instance.currentRoom!=null");
if (!FightWorld.Instance.currentRoom.paths.TryGetValue(pathIndex, out var nextRoom)) if (!FightWorld.Instance.currentRoom.paths.TryGetValue(pathIndex, out var nextRoom))
throw new Exception("Trying to go down a non-existent path"); throw new Exception("Trying to go down a non-existent path");

@ -164,6 +164,7 @@ public partial class FightWorld : Node
{ {
var typeRoll = GD.RandRange(0, 99); var typeRoll = GD.RandRange(0, 99);
// Disabled generating different types due to lack of fighter visual type implementation
//var type = typeRoll switch //var type = typeRoll switch
//{ //{
// < 50 => Fighter.Type.Blob, // < 50 => Fighter.Type.Blob,

@ -63,16 +63,6 @@ public partial class FighterVisual : Node2D
} }
// Animations // Animations
//public void AttackAnimation(FightAttack attack)
//{
// EmitSignalAttacking();
// var tween = GetTree().CreateTween();
// tween.TweenProperty(this, "global_position", attack.target.GlobalPosition, 0.15);
// tween.TweenCallback(Callable.From(() => attack.target?.HitAnimation(attack)));
// tween.TweenProperty(this, "position", new Vector2(0, 0), 0.7)
// .SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
//}
public async Task AnimatePosToTarget(FighterVisual targetVisual, double duration = 0.15) public async Task AnimatePosToTarget(FighterVisual targetVisual, double duration = 0.15)
{ {
var tween = GetTree().CreateTween(); var tween = GetTree().CreateTween();
@ -96,16 +86,7 @@ public partial class FighterVisual : Node2D
await ToSignal(tween, "finished"); await ToSignal(tween, "finished");
} }
// Keep for reference for new Heal animation
//private void HitAnimation(FightAttack attack)
//{
// EmitSignalDamageTaken();
// var tween = GetTree().CreateTween();
// tween.TweenProperty(this, "scale", new Vector2(1.4f, 0.6f), 0.15);
// tween.TweenProperty(this, "scale", new Vector2(1, 1), 0.4)
// .SetTrans(Tween.TransitionType.Cubic).SetEase(Tween.EaseType.Out);
//}
//
//public void HealAnimation() //public void HealAnimation()
//{ //{
// EmitSignalHealed(); // EmitSignalHealed();

@ -11,12 +11,6 @@ public partial class RegionVisual : Node
[Export(PropertyHint.DictionaryType)] private Dictionary<MinigameController.RegionTheme, Color> _fillColors = new(); [Export(PropertyHint.DictionaryType)] private Dictionary<MinigameController.RegionTheme, Color> _fillColors = new();
public override void _EnterTree()
{
//_sliceSprite.Material = new Material()
}
public void Setup(Vector2 normalAngles, Color color, string regionText, MinigameController.RegionTheme regionTheme) public void Setup(Vector2 normalAngles, Color color, string regionText, MinigameController.RegionTheme regionTheme)
{ {
var mat = (_sliceSprite.Material as ShaderMaterial)!; var mat = (_sliceSprite.Material as ShaderMaterial)!;

Loading…
Cancel
Save