public Team(TeamSide side, Platoon platoon) { _Side = side; _Platoon = platoon; _Platoon.SetSide(side); _Strategys = new int[(int)Strategy.Count]; if (_Platoon.Formation == Contingent.FormationType.Auxiliary) { _Front = new ITeammate[] { _Platoon.Teammates[0] }; int i = 0; _Back = (from teammate in _Platoon.Teammates let idx = i++ where idx > 0 select teammate).ToArray(); } if (_Platoon.Formation == Contingent.FormationType.Defensive) { _Back = new ITeammate[] { _Platoon.Teammates[0] }; int i = 0; _Front = (from teammate in _Platoon.Teammates let idx = i++ where idx > 0 select teammate).ToArray(); } }
public CombatStage(BattlefieldPrototype prototype, Platoon platoon) { _Prototype = prototype; _Platoon = platoon; _Combat = new Combat(); }
public GoForwardStage(float position, Station station, Platoon platoon) { _Station = station; this._Position = position; _Platoon = platoon; _Agent = new Standalong.Agent(); }
public Levels(MapPrototype map_prototype, Squad squad) { _Position = 0.0f; _Id = Guid.NewGuid(); this._MapPrototype = map_prototype; _Stations = new Queue<Station>(_MapPrototype.Stations); _StageMachine = new Regulus.Utility.StageMachine(); _Platoon = new Platoon(squad); _Platoon.EmptyEvent += () => { ReleaseEvent(); }; _Platoons = new Utility.Updater(); ; }
void Regulus.Game.IStage.Enter() { var team1 = new Team(TeamSide.Left,_Platoon); var enemys = (from enemy in _Prototype.Enemys select new Teammate(new ActorInfomation() { Exp = 0, Prototype = enemy })).ToArray(); var platoonEnemy = new Platoon(new Squad(Contingent.FormationType.Auxiliary, enemys , new AIController())); var team2 = new Team(TeamSide.Right, platoonEnemy); _Combat.Initial(team1, team2); _Combat.WinnerEvent += (winner) => { if (winner == team1) ResultEvent(Result.Victory); else ResultEvent(Result.Failure); }; _Combat.DrawEvent += () => { ResultEvent(Result.Failure); }; _Platoons = new Utility.Updater<Platoon>(); _Platoons.Add(platoonEnemy); }