예제 #1
0
파일: Squad.cs 프로젝트: Roger-luo/OpenRA
		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;
			}
		}
예제 #2
0
파일: Squad.cs 프로젝트: JackKucan/OpenRA
		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;
			}
		}