You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
805 B
39 lines
805 B
using System;
|
|
|
|
namespace Babushka.scripts.CSharp.Common.Fight.ActionDetails;
|
|
|
|
public class TargetSelectActionDetail : FighterAction.FighterActionDetail
|
|
{
|
|
public enum VisualRange
|
|
{
|
|
Single
|
|
}
|
|
|
|
// settings
|
|
public required bool selectEnemy;
|
|
public required bool selectAlly;
|
|
public VisualRange visualRange = VisualRange.Single;
|
|
|
|
// result
|
|
private FightWorld.Fighter? target;
|
|
|
|
public override bool DetailComplete()
|
|
{
|
|
return target != null;
|
|
}
|
|
|
|
public void ResetResult()
|
|
{
|
|
target = null;
|
|
}
|
|
|
|
public void SetTarget(FightWorld.Fighter fighter)
|
|
{
|
|
target = fighter;
|
|
}
|
|
|
|
public FightWorld.Fighter GetTarget()
|
|
{
|
|
return target ?? throw new InvalidOperationException("No target selected");
|
|
}
|
|
} |