public Squad(HackyAI bot, SquadT type, Actor target) { Bot = bot; World = bot.World; Random = bot.Random; Type = type; Target = Target.FromActor(target); FuzzyStateMachine = new StateMachine(); switch (type) { case SquadT.Assault: case SquadT.Rush: FuzzyStateMachine.ChangeState(this, new GroundUnitsIdleState(), true); break; case SquadT.Air: FuzzyStateMachine.ChangeState(this, new AirIdleState(), true); break; case SquadT.Protection: FuzzyStateMachine.ChangeState(this, new UnitsForProtectionIdleState(), true); break; } }
Squad RegisterNewSquad(SquadT type, Actor target = null) { var ret = new Squad(this, type, target); Squads.Add(ret); return(ret); }
Squad GetSquadOfType(SquadT type) { return(Squads.FirstOrDefault(s => s.Type == type)); }
public Squad(HackyAI bot, SquadT type) : this(bot, type, null) { }