Aetheria/Assets/Scripts/ServerShared/Agents/Minion.cs
Reinier Vens 4489b18452 Action Bar (WIP)
Refactor item instance to use DatabaseLink
Labels now pop up when aiming at loot
Yeeted HUD trigger group UI into the abyss
Created rebindable action bar (missing: assigning actions)
Created Consumable Items
Refactored behaviors to work on consumable items
Implemented Velocity Conversion Behavior
2021-04-18 05:13:20 +01:00

23 lines
No EOL
750 B
C#

using System.Linq;
using UniRx;
public class Minion : Agent
{
public Minion(Ship ship) : base(ship)
{
var patrolState = new PatrolOrbitsState(this);
_rootState.AddTransition(patrolState,
() => Task is PatrolOrbitsTask,
() => patrolState.Task = Task as PatrolOrbitsTask);
Ship.VisibleHostiles.ObserveAdd().Where(_ => Ship.Target.Value == null).Subscribe(add => Ship.Target.Value = add.Value);
var combatState = new CombatState(this);
_rootState.AddTransition(combatState,
() => Ship.Target.Value != null, null, true, _rootState);
combatState.AddTransition(_rootState,
() => Ship.Target.Value == null, null, true, _rootState);
}
}