Fixed Laser cancelling bug Fixed Turrets not activating Added ability to bind player perspective to orbital entities Added Markov Chain name generator + Australian place name dataset Modified old "galaxy" shader to serve as sector background Implemented Cem Yuksel's Weighted Sample Elimination for Poisson Disk Sample Sets Created sector generator which places sectors using WSE
23 lines
No EOL
751 B
C#
23 lines
No EOL
751 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);
|
|
}
|
|
} |