public Squad(HackyAI bot, SquadType type, Actor target) { Bot = bot; World = bot.World; Random = bot.Random; Type = type; Target = Target.FromActor(target); FuzzyStateMachine = new StateMachine(); switch (type) { case SquadType.Assault: case SquadType.Rush: FuzzyStateMachine.ChangeState(this, new GroundUnitsIdleState(), true); break; case SquadType.Air: FuzzyStateMachine.ChangeState(this, new AirIdleState(), true); break; case SquadType.Protection: FuzzyStateMachine.ChangeState(this, new UnitsForProtectionIdleState(), true); break; } }
public Squad(HackyAI bot, SquadType type, Actor target) { this.bot = bot; this.world = bot.world; this.random = bot.random; this.type = type; this.target = Traits.Target.FromActor(target); fsm = new StateMachine(); switch (type) { case SquadType.Assault: case SquadType.Rush: fsm.ChangeState(this, new GroundUnitsIdleState(), true); break; case SquadType.Air: fsm.ChangeState(this, new AirIdleState(), true); break; case SquadType.Protection: fsm.ChangeState(this, new UnitsForProtectionIdleState(), true); break; } }