Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1edbe7aeb7 |
@@ -0,0 +1 @@
|
|||||||
|
uid://dtn4la0ycl5wx
|
||||||
@@ -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))
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://oipfvb87uyq3
|
||||||
@@ -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)!;
|
||||||
|
|||||||
Reference in New Issue
Block a user