public void UpdateStartGame(bool isStartingGame) { if (isStartingGame) { oriTriggers.OnStartGame(isStartingGame); sMapCompletion = 0; sCurrentArea = default(Area); sAreas.Clear(); } }
public void OnMapCompletionChange(Area[] val, Decimal sMapCompletion) { mapCompletion = sMapCompletion; }
public void UpdateMap() { Area[] areas = oriMemory.GetMapCompletion(); if (areas.Length == 0) return; List<Area> newAreas = new List<Area>(); decimal mapCompletion = 0; foreach (var area in areas) { mapCompletion += area.progress; newAreas.Add(area); if (area.current) { sCurrentArea = area; } } sAreas = newAreas; mapCompletion = Math.Round((decimal)mapCompletion / areas.Length, 2, MidpointRounding.AwayFromZero); if (mapCompletion != sMapCompletion) { oriTriggers.OnMapCompletionChange(areas, sMapCompletion); sMapCompletion = mapCompletion; } }