private void StartRandomVisibleSongs() { CGame.Reset(); CGame.ClearSongs(); List <int> IDs = new List <int>(); for (int i = 0; i < CSongs.VisibleSongs.Length; i++) { IDs.Add(CSongs.VisibleSongs[i].ID); } while (IDs.Count > 0) { int SongNr = IDs[CGame.Rand.Next(IDs.Count)]; EGameMode gm = EGameMode.TR_GAMEMODE_NORMAL; if (CSongs.AllSongs[SongNr].IsDuet) { gm = EGameMode.TR_GAMEMODE_DUET; } CGame.AddSong(SongNr, gm); IDs.Remove(SongNr); } if (CGame.GetNumSongs() > 0) { CGraphics.FadeTo(EScreens.ScreenNames); } }
// Token: 0x060031CC RID: 12748 RVA: 0x00143D9C File Offset: 0x0014219C public GameplayConfigData(EGameMode mode) { this.Repair_Level_Max = 3u; if (mode != EGameMode.HARD) { this.Hitmarkers = true; this.Crosshair = true; } else { this.Hitmarkers = false; this.Crosshair = false; } if (mode != EGameMode.EASY) { this.Ballistics = true; } else { this.Ballistics = false; } this.Chart = (mode == EGameMode.EASY); this.Satellite = false; this.Compass = false; this.Group_Map = (mode != EGameMode.HARD); this.Group_HUD = true; this.Allow_Static_Groups = true; this.Allow_Dynamic_Groups = true; this.Allow_Shoulder_Camera = true; this.Can_Suicide = true; this.Timer_Exit = 10u; this.Timer_Respawn = 10u; this.Timer_Home = 30u; this.Max_Group_Members = 0u; }
// Token: 0x060031C5 RID: 12741 RVA: 0x0014392C File Offset: 0x00141D2C public AnimalsConfigData(EGameMode mode) { this.Respawn_Time = 180f; if (mode != EGameMode.EASY) { if (mode != EGameMode.HARD) { this.Damage_Multiplier = 1f; this.Armor_Multiplier = 1f; } else { this.Damage_Multiplier = 1.5f; this.Armor_Multiplier = 0.75f; } } else { this.Damage_Multiplier = 0.75f; this.Armor_Multiplier = 1.25f; } this.Max_Instances_Tiny = 4u; this.Max_Instances_Small = 8u; this.Max_Instances_Medium = 16u; this.Max_Instances_Large = 32u; this.Max_Instances_Insane = 64u; }
public void ReadLobbyData() { string hostplayernameData = SteamMatchmaking.GetLobbyData(LobbyID, "hostplayername"); string levelnameData = SteamMatchmaking.GetLobbyData(LobbyID, "levelname"); string gamemodeData = SteamMatchmaking.GetLobbyData(LobbyID, "gamemode"); HostName = string.IsNullOrEmpty(hostplayernameData) ? "" : hostplayernameData; LevelName = ParseLevelName(levelnameData); GameMode = ParseGameMode(gamemodeData); NumPlayers = SteamMatchmaking.GetNumLobbyMembers(LobbyID); MaxPlayers = Math.Max(MaxPlayers, NumPlayers); UpdateTime = DateTime.Now; Alive = true; UpdatePending = false; /*int dataCount = SteamMatchmaking.GetLobbyDataCount(lobbyID); * for (int i = 0; i < dataCount; i++) * { * string Key; * string Value; * SteamMatchmaking.GetLobbyDataByIndex(lobbyID, i, out Key, 255, out Value, 255); * Debug.WriteLine("Data#" + i + ": " + Key + " -> " + Value); * }*/ }
bool TryInitNextGame() { _currentGameNumber++; if (_currentGameNumber >= _settings.Count) { return(false); } var settings = _settings[_currentGameNumber]; _game = _GameCreationDelegate(settings, GamePurpose.visualizationGame); _game.roundNumber = -1; _game.rounds = new List <TRound>(); if (_game.players.Count == 0) { throw new Exception("В State.Init() должны быть созданы players"); } if (_allRounds != null) { _gameMode = EGameMode.replayFile; } else { _gameMode = _game.players.Any(x => x.controlledByHuman) ? EGameMode.localWithHuman : EGameMode.localWithoutHuman; _allRounds = new ConcurrentDictionary <int, TRound>(); } if (_gameMode == EGameMode.localWithoutHuman) { if (FrameworkSettings.AllowFastGameInBackgroundThread) { RunGameWithoutHumanInBackground(); } else { _gameMode = EGameMode.localWithHuman; } } //_turnReceiver = new TurnReceiver(_currentState, _engine, settings.javaPath, settings.ThisIsReplayGame); //if (settings.ThisIsReplayGame) //{ // bool success = _turnReceiver.TryLoadReplay(settings.replayPath); // if (!success) // { // _currentState.Message = "Не удалось загрузить повтор. Нажмите Enter"; // _currentState.IsFinished = true; // } //} // AnimationGoNextTurn(); // DrawAll(); GoToPhase(EProcessPhase.beforeRound); return(true); }
public GameView this[EGameMode mode] { get { return(_views[mode]); } }
/// <summary> Filters <paramref name="vehicles"/> with <paramref name="validEconomicRanksNations"/>. </summary> /// <param name="validEconomicRanksNations"> Vehicle classes enabled via GUI and actually available. </param> /// <param name="vehicles"> Vehicles to filter. </param> /// <returns></returns> private IEnumerable <IVehicle> FilterVehiclesByEconomicRanks(EGameMode gameMode, IDictionary <ENation, IEnumerable <IVehicle> > vehiclesByNations, IDictionary <ENation, IEnumerable <int> > validEconomicRanks) { var vehiclesWithEconomocRankFilter = new List <IVehicle>(); foreach (var nationKeyValuePair in validEconomicRanks) { var nation = nationKeyValuePair.Key; var economicRanks = nationKeyValuePair.Value; vehiclesWithEconomocRankFilter.AddRange(FilterVehiclesByEconomicRanks(gameMode, economicRanks, vehiclesByNations[nation])); } if (vehiclesWithEconomocRankFilter.IsEmpty()) { var parameterString = validEconomicRanks .Select(keyValuePair => $"{keyValuePair.Key}: {keyValuePair.Value.StringJoin(ESeparator.CommaAndSpace)}") .StringJoin(ESeparator.VerticalBarAndSpace) ; LogWarn(EOrganizationLogMessage.NoVehiclesAvailableFor.Format(parameterString)); return(null); } return(vehiclesWithEconomocRankFilter); }
public static async Task <List <HighScores> > GetHighscoresForModeAsync(EGameMode mode) // MAX HIGHORE SPACE IS 10 { HighScores[] retValue = null; string url = @"https://www.duckswithgunz.co.uk/api/HighScores/" + (int)mode; using (var client = new HttpClient()) { try { HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, url); httpRequestMessage.Headers.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", KEY); HttpResponseMessage responseMessage = await client.SendAsync(httpRequestMessage); string response = await responseMessage.Content.ReadAsStringAsync(); retValue = JsonConvert.DeserializeObject <HighScores[]>(response); } catch (Exception e) { Debug.LogError(e.Message); } } return(retValue.ToList()); }
// Token: 0x060031CB RID: 12747 RVA: 0x00143C80 File Offset: 0x00142080 public EventsConfigData(EGameMode mode) { this.Rain_Frequency_Min = 2.3f; this.Rain_Frequency_Max = 5.6f; this.Rain_Duration_Min = 0.05f; this.Rain_Duration_Max = 0.15f; this.Snow_Frequency_Min = 1.3f; this.Snow_Frequency_Max = 4.6f; this.Snow_Duration_Min = 0.2f; this.Snow_Duration_Max = 0.5f; this.Airdrop_Frequency_Min = 0.8f; this.Airdrop_Frequency_Max = 6.5f; this.Airdrop_Speed = 128f; this.Airdrop_Force = 9.5f; this.Arena_Clear_Timer = 5u; this.Arena_Finale_Timer = 10u; this.Arena_Restart_Timer = 15u; this.Arena_Compactor_Delay_Timer = 1u; this.Arena_Compactor_Pause_Timer = 5u; this.Arena_Min_Players = 2u; this.Arena_Compactor_Damage = 10u; this.Arena_Use_Airdrops = true; this.Arena_Use_Compactor_Pause = true; this.Arena_Compactor_Speed_Tiny = 0.5f; this.Arena_Compactor_Speed_Small = 1.5f; this.Arena_Compactor_Speed_Medium = 3f; this.Arena_Compactor_Speed_Large = 4.5f; this.Arena_Compactor_Speed_Insane = 6f; this.Arena_Compactor_Shrink_Factor = 0.5f; }
bool isMatchWnd(IUIWnd wnd) { int loadMask; EGameMode gameMode = GameLogicAPI.getCurGameMode(); switch (gameMode) { case EGameMode.EGM_Moba: loadMask = (int)WndLoadMaskDef.WND_LoadMask_Moba; break; case EGameMode.EGM_MCAMP: loadMask = (int)WndLoadMaskDef.WND_LoadMask_MCAMP; break; case EGameMode.EGM_RPG: default: loadMask = (int)WndLoadMaskDef.WND_LoadMask_RPG; break; } int permissionMask = (int)WndPermissionMaskDef.WND_PM_Normal; if (StageManager.Instance.CurPermissionState == EStage_PermissionState.ESPS_OB) { permissionMask = (int)WndPermissionMaskDef.WND_PM_OB; } return((wnd.GetLoadMask() & loadMask) != 0 && (wnd.GetPermissionMask() & permissionMask) != 0); }
private static void onClickedDefaultButton(SleekButton button) { MenuPlayConfigUI.modeConfigData = new ModeConfigData(PlaySettings.singleplayerMode); EGameMode singleplayerMode = PlaySettings.singleplayerMode; if (singleplayerMode != EGameMode.EASY) { if (singleplayerMode != EGameMode.NORMAL) { if (singleplayerMode == EGameMode.HARD) { MenuPlayConfigUI.configData.Hard = MenuPlayConfigUI.modeConfigData; } } else { MenuPlayConfigUI.configData.Normal = MenuPlayConfigUI.modeConfigData; } } else { MenuPlayConfigUI.configData.Easy = MenuPlayConfigUI.modeConfigData; } MenuPlayConfigUI.refreshConfig(); }
private void OnGameModeToggled(bool pValue, EGameMode pGameMode) { if (!pValue) { return; } gameInitInfo.Mode = pGameMode; }
// Token: 0x060031C9 RID: 12745 RVA: 0x00143C37 File Offset: 0x00142037 public ObjectConfigData(EGameMode mode) { this.Binary_State_Reset_Multiplier = 1f; this.Fuel_Reset_Multiplier = 1f; this.Water_Reset_Multiplier = 1f; this.Resource_Reset_Multiplier = 1f; this.Rubble_Reset_Multiplier = 1f; }
internal void Pause() { m_playMode = m_pause.IsChecked.Value ? EGameMode.PAUSED : EGameMode.PLAYING; m_main.m_Layout.m_ViewPort.m_borderBrush.BorderBrush = new SolidColorBrush(m_pause.IsChecked.Value ? Windows.UI.Colors.Orange : Windows.UI.Colors.GreenYellow); SetStatus(m_pause.IsChecked.Value ? "Paused Gamemode" : "Continued Gamemode"); }
/// <summary> Generates a formatted string with <paramref name="vehicle"/> information for the given <paramref name="gameMode"/>. </summary> /// <param name="gameMode"> The game mode to account for. </param> /// <param name="vehicle"> The vehicle whose information to display. </param> /// <returns></returns> public override string GetVehicleInfoBottomRow(EGameMode gameMode, IVehicle vehicle) { var stringBuilder = new StringBuilder(); SetFirstSharedPart(stringBuilder, gameMode, vehicle); SetSecondSharedPart(stringBuilder, vehicle); return(stringBuilder.ToString()); }
public static void InsertSong(int playlistID, int positionIndex, int songID, EGameMode gameMode) { CPlaylistFile pl = Get(playlistID); if (pl != null) { pl.InsertSong(positionIndex, songID, gameMode); } }
public static void AddSong(int playlistID, int songID, EGameMode gameMode) { CPlaylistFile pl = Get(playlistID); if (pl != null) { pl.AddSong(songID, gameMode); } }
public void UpdateFor(EGameMode gameMode) { _informationTextBlock.Text = _displayVehicleInformationStrategy.GetVehicleInfoBottomRow(gameMode, Vehicle); if (_tooltipInitialised) { _tooltip.UpdateFor(gameMode); } }
protected void SetFirstSharedPart(StringBuilder stringBuilder, EGameMode gameMode, IVehicle vehicle) { void append(object stringOrCharacter) => stringBuilder.Append(stringOrCharacter); if (ShowStarterGiftTag(vehicle)) { append($"{GetLocalisedString(ELocalisationKey.Starter)}{ECharacter.Space}"); } else if (ShowReserveTag(vehicle)) { append($"{GetLocalisedString(ELocalisationKey.Reserve)}{ECharacter.Space}"); } if (ShowEyeIcon(vehicle)) { append(ECharacter.Eye); } if (ShowControllerIcon(vehicle)) { append(EGaijinCharacter.Controller); } if (ShowSpaceAfterControllerIcon(vehicle)) { append(ECharacter.Space); } if (ShowPackTag(vehicle)) { append(GetLocalisedString(ELocalisationKey.Pack)); } else if (ShowGoldenEagleCost(vehicle)) { append($"{vehicle.EconomyData.PurchaseCostInGold.Value}{EGaijinCharacter.GoldenEagle}"); } else if (ShowSquadronGoldenEagleCost(vehicle)) { append($"{vehicle.EconomyData.DiscountedPurchaseCostInGoldAsSquadronVehicle.Value}{ECharacter.Minus}{vehicle.EconomyData.PurchaseCostInGoldAsSquadronVehicle.Value}{EGaijinCharacter.GoldenEagle}"); } if (ShowMarketIcon(vehicle)) { append(EGaijinCharacter.GaijinCoin); } if (ShowSpaceAfterSpecialIconsAndTags(vehicle)) { append(ECharacter.Space); } if (ShowBinocularsIcon(vehicle)) { append($"{EGaijinCharacter.Binoculars}{ECharacter.Space}"); } append(GetBattleRating(gameMode, vehicle)); }
public void AddSong(int SongID, EGameMode gm) { CPlaylistSong song = new CPlaylistSong(); song.SongID = SongID; song.GameMode = gm; Songs.Add(song); }
private bool _AddSong(int songID, EGameMode gameMode) { if (!CSongs.GetSong(songID).IsGameModeAvailable(gameMode)) { return(false); } _SongQueue.Add(new SSongQueueEntry(songID, gameMode)); return(true); }
/// <summary> Cretes a new preset from the given list of vehicles. </summary> /// <param name="nation"> The preset's nation. </param> /// <param name="gameMode"> The preset's game mode. </param> /// <param name="mainBranch"> The preset's main branch. </param> /// <param name="economicRank"> The preset's <see cref="IVehicle.EconomicRank"/>. </param> /// <param name="battleRating"> The preset's battle rating. </param> /// <param name="vehicleList"> The vehicle list to use for initialisation. </param> public Preset(EGameMode gameMode, ENation nation, EBranch mainBranch, int economicRank, string battleRating, IList <IVehicle> vehicleList) : base(vehicleList) { GameMode = gameMode; Nation = nation; MainBranch = mainBranch; EconomicRank = economicRank; BattleRating = battleRating; Branches = this.Select(vehicle => vehicle.Branch).Distinct(); }
/// <summary> Generates a vehicle type composition for a preset. </summary> /// <param name="gameMode"> The game mode to generate preset composition for. </param> /// <param name="allowedBranches"> Branches allowed in the composition. </param> /// <param name="crewSlotAmount"> The amount of available crew slots. </param> /// <param name="mainBranch"> The branch whose vehicles serve as the core of a preset. </param> /// <returns></returns> private IDictionary <EBranch, int> GetPresetComposition(EGameMode gameMode, IEnumerable <EBranch> allowedBranches, int crewSlotAmount, EBranch mainBranch) { var presetComposition = new Dictionary <EBranch, int>(); void setAll(EBranch branch) => presetComposition.Add(branch, crewSlotAmount); void setQuarter(EBranch branch) => presetComposition.Add(branch, Convert.ToInt32(Math.Ceiling(crewSlotAmount * 0.25))); void setTwoThirds(EBranch branch) => presetComposition.Add(branch, Convert.ToInt32(Math.Ceiling(crewSlotAmount * 2.0 / 3.0))); void setThreeQuarters(EBranch branch) => presetComposition.Add(branch, Convert.ToInt32(Math.Ceiling(crewSlotAmount * 0.75))); void setHalf(EBranch branch) => presetComposition.Add(branch, Convert.ToInt32(Math.Ceiling(crewSlotAmount * 0.5))); void setRemaining(EBranch branch, params EBranch[] otherBranches) => presetComposition.Add(branch, crewSlotAmount - otherBranches.Sum(branch => presetComposition[branch]));
public static string GetGameModeNameFromType(EGameMode type) { switch (type) { case EGameMode.SURVIVAL_MODE: return("SURVIVAL"); case EGameMode.TIME_TRIAL_MODE: return("TIME TRIAL"); default: return("NOT_SET"); } }
void SetStatusAppBarButtons(bool _b) { m_playMode = _b ? EGameMode.PLAYING : EGameMode.NONE; m_pause.IsEnabled = _b; m_forward.IsEnabled = _b; m_pause.IsChecked = false; m_play.Label = _b ? "Stop" : "Play"; m_play.Icon = _b ? new SymbolIcon(Symbol.Stop) : new SymbolIcon(Symbol.Play); }
public void InsertSong(int destNr, int songID, EGameMode gm) { if (destNr < 0 || destNr >= Songs.Count) { return; } CPlaylistSong ps = new CPlaylistSong(songID, gm); Songs.Insert(destNr, ps); }
public string GetVehicleCardRepairCost(IVehicle vehicle, EGameMode gameMode) { var cost = vehicle.EconomyData.RepairCost[gameMode]; if (!cost.HasValue || cost.Value.IsZero()) { return(ApplicationHelpers.LocalisationManager.GetLocalisedString(ELocalisationKey.Free)); } return($"{cost.Value.WithNumberGroupsSeparated()}{ECharacter.Space}{EGaijinCharacter.SilverLion}"); }
public void SongInsert(int DestNr, int SongID, EGameMode gm) { if (DestNr < 0 || DestNr > Songs.Count - 1) { return; } CPlaylistSong ps = new CPlaylistSong(SongID, gm); Songs.Insert(DestNr, ps); }
// Token: 0x0600308A RID: 12426 RVA: 0x0013EED4 File Offset: 0x0013D2D4 public SteamServerInfo(string newName, EGameMode newMode, bool newVACSecure, bool newBattlEyeEnabled, bool newPro) { this._name = newName; if (OptionsSettings.filter) { this._name = ChatManager.filter(this.name); } this._mode = newMode; this.IsVACSecure = newVACSecure; this.IsBattlEyeSecure = newBattlEyeEnabled; this._isPro = newPro; }
/// <summary> Return value of the game mode parameter corresponding to the given enumeration value. </summary> /// <param name="gameMode"> The game mode the value for which to get. </param> /// <returns></returns> public virtual string this[EGameMode gameMode] { get { return(gameMode switch { EGameMode.Arcade => Arcade, EGameMode.Realistic => Realistic, EGameMode.Simulator => Simulator, EGameMode.Event => Event, _ => null, });
public static bool AddSong(int AbsoluteIndex, EGameMode GameMode) { return _GameMode.AddSong(AbsoluteIndex, GameMode); }
public static void SetGameMode(EGameMode Mode) { switch (Mode) { case EGameMode.Normal: _GameMode = new CGameModeNormal(); break; case EGameMode.Medley: _GameMode = new CGameModeMedley(); break; case EGameMode.Duet: _GameMode = new CGameModeDuet(); break; default: break; } _GameMode.Init(); }
public void recenterStartingPoint(int blocks, EGameMode e) { screenParts[e].RecenterStartingPos((int)(blocks * Constants.Measures.blockSize * Constants.Measures.Scale)); }
public virtual bool AddSong(int AbsoluteIndex, EGameMode GameMode) { if (CSongs.AllSongs.Length > AbsoluteIndex) { int SongID = CSongs.AllSongs[AbsoluteIndex].ID; if (GameMode == EGameMode.TR_GAMEMODE_DUET && !CSongs.GetSong(SongID).IsDuet) return false; _SongQueque.Add(new SongQueque(SongID, GameMode)); return true; } return false; }
public SongQueque(int songID, EGameMode gameMode) { SongID = songID; GameMode = gameMode; }
public CPlaylistSong(int SongID, EGameMode gm) { this.SongID = SongID; this.GameMode = gm; }
void Update() { if (bInSettings) { if (Input.GetKeyDown (KeyCode.DownArrow)) { CurrentSetting = EditSettings.DURATION; foreach (SpriteRenderer sr in ModeSetting.GetComponentsInChildren<SpriteRenderer>()) { sr.enabled = false; } foreach (SpriteRenderer sr in DurationSetting.GetComponentsInChildren<SpriteRenderer>()) { sr.enabled = true; if (sr.gameObject.name.Contains ("right")) { RightTriangle = sr; } else { LeftTriangle = sr; } } } else if (Input.GetKeyDown (KeyCode.UpArrow)) { CurrentSetting = EditSettings.MODE; foreach (SpriteRenderer sr in DurationSetting.GetComponentsInChildren<SpriteRenderer>()) { sr.enabled = false; } foreach (SpriteRenderer sr in ModeSetting.GetComponentsInChildren<SpriteRenderer>()) { if (sr.gameObject.name.Contains ("right")) { RightTriangle = sr; } else { LeftTriangle = sr; } if (GameMode == EGameMode.MP) { RightTriangle.enabled = true; } else { LeftTriangle.enabled = true; } } } else if (Input.GetKeyDown (KeyCode.RightArrow)) { if (CurrentSetting == EditSettings.MODE) { ModeSetting.GetComponent<TextMesh>().text = "single player"; GameMode = EGameMode.SP; RightTriangle.enabled = false; LeftTriangle.enabled = true; } else { LeftTriangle.enabled = true; GameDuration += 5; DurationSetting.GetComponent<TextMesh>().text = GameDuration + " seconds"; } } else if (Input.GetKeyDown (KeyCode.LeftArrow)) { if (CurrentSetting == EditSettings.MODE) { ModeSetting.GetComponent<TextMesh>().text = "multiplayer"; GameMode = EGameMode.MP; RightTriangle.enabled = true; LeftTriangle.enabled = false; } else { if (GameDuration > 0) { GameDuration -= 5; DurationSetting.GetComponent<TextMesh>().text = GameDuration + " seconds"; } if (GameDuration == 0) { LeftTriangle.enabled = false; } } } } if (bGameStarted) { SpriteScreen.GetComponent<SpriteRenderer>().color = Color.Lerp (SpriteScreen.GetComponent<SpriteRenderer>().color, EndColor, FadeSpeed*Time.deltaTime); } if (GameView == EGameView.Game) { TimeSinceGameStart += Time.deltaTime; if (TimeSinceGameStart >= GameDuration) { EndGame (EGryll.BEARD); } } }
public bool isPressed(EInputKeys e, EGameMode g) { return states[g][e]; }
public CPlaylistSong(CPlaylistSong ps) { SongID = ps.SongID; GameMode = ps.GameMode; }
public void SongInsert(int DestNr, int SongID, EGameMode gm) { if (DestNr < 0 || DestNr > Songs.Count - 1) return; CPlaylistSong ps = new CPlaylistSong(SongID, gm); Songs.Insert(DestNr, ps); }
public CPlaylistSong() { GameMode = EGameMode.TR_GAMEMODE_NORMAL; }
public static bool AddVisibleSong(int VisibleIndex, EGameMode GameMode) { return _GameMode.AddVisibleSong(VisibleIndex, GameMode); }