void InitializeArenas() { Dbg.Log("Initializing Arenas"); LG_ArenaDescriptor arenaDesc = new LG_ArenaDescriptor(); // arenaDesc.Name = "Arena2"; // TO DO fix arena selection arenaDesc.Name = "Arena3"; _arenas.Add(arenaDesc); }
// ------------------------------------------------------------------------------ protected override void Reset() // ------------------------------------------------------------------------------ { base.Reset(); if (_teams != null) { for (int i = 0; i < _teams.Count; i++) { _teams[i].Shutdown(); } } _arena = null; _arenaDesc = null; _matchState = State.Idle; _teams = null; }
// ------------------------------------------------------------------------------ /// <summary> /// This is called while still in the league scene to set up the match for play. /// It configures some data and moves to the given arena /// </summary> /// <param name="matchParam"></param> /// <param name="arena"></param> public void StartMatch(BS_MatchParams matchParam, LG_ArenaDescriptor arena) // ------------------------------------------------------------------------------ { _arenaDesc = arena; _matchState = State.Loading; _matchResult = new BS_MatchResult(); SetTeams(matchParam, PT_Game.League); // if we don't have an rena, then we are doing a simulated match. if (_arenaDesc == null) { _matchState = State.Running; _matchSimulator.Run(matchParam, _matchResult); } else // otherwise, load that level and go to town with the mission { PT_GamePhaseMatch gpMatch = PT_Game.Phases.GetPhase <PT_GamePhaseMatch>(); gpMatch.SceneName = arena.Name; PT_Game.Phases.QueuePhase(gpMatch); } }