Live review changes

jonathan 2 months ago
parent 45d4b26b6a
commit 1edbe7aeb7

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

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

@ -32,7 +32,7 @@ public partial class FightSceneSwitcher : Node
public void SwitchRoom(int pathIndex)
{
Debug.Assert(FightWorld.Instance.currentRoom != null, "FightWorld.Instance.currentRoom!=null");
if (!FightWorld.Instance.currentRoom.paths.TryGetValue(pathIndex, out var nextRoom))
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);
// Disabled generating different types due to lack of fighter visual type implementation
//var type = typeRoll switch
//{
// < 50 => Fighter.Type.Blob,

@ -63,16 +63,6 @@ public partial class FighterVisual : Node2D
}
// 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)
{
var tween = GetTree().CreateTween();
@ -96,16 +86,7 @@ public partial class FighterVisual : Node2D
await ToSignal(tween, "finished");
}
//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);
//}
//
// Keep for reference for new Heal animation
//public void HealAnimation()
//{
// EmitSignalHealed();

@ -11,12 +11,6 @@ public partial class RegionVisual : Node
[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)
{
var mat = (_sliceSprite.Material as ShaderMaterial)!;

Loading…
Cancel
Save