private void OnSecretaryCountChanged(int oldCount, int newCount, SecretaryInfo secretary) { if (IsLoaded) { if (newCount > 0) { SkipState(TutorialStateName.Report); } } }
private void OnWorkCompleted(SecretaryInfo secretary, int count) { int reportCount = GetReportCount(secretary.GeneratorId); if (reportCount > 0) { if (secretary.Count > 0) { int handleCount = Mathf.Min(reportCount, count * secretary.Count); int removed = GetReportInfo(secretary.GeneratorId).RemoveReports(handleCount); UDebug.Log($"reports handled => {removed}"); } } }
public BosError BuySecretary(int generatorId) { int price = GetNextSecretaryPrice(generatorId); Currency currency = Currency.CreateCoins(price); if (Services.PlayerService.IsEnough(currency)) { Services.PlayerService.RemoveCurrency(currency); SecretaryInfo info = GetSecretaryInfo(generatorId); int oldCount = info.Count; info.AddSecretary(1); if (oldCount != info.Count) { GameEvents.OnSecretaryCountChanged(oldCount, info.Count, info); } return(BosError.Ok); } else { return(BosError.NoEnoughCoins); } }
//public static void OnAuditorAvailableChanged(AuditorInfo auditor) // => AuditorAvailableChanged?.Invoke(auditor); public static void OnSecretaryCountChanged(int oldCount, int newCount, SecretaryInfo secretary) => SecretaryCountChanged?.Invoke(oldCount, newCount, secretary);
public static void OnSecretaryWorkCircleCompleted(SecretaryInfo secretary, int circleCount) => SecretaryWorkCircleCompleted?.Invoke(secretary, circleCount);
public static void OnSecretaryStateChanged(SecretaryState oldState, SecretaryState newState, SecretaryInfo secretary) => SecretaryStateChanged?.Invoke(oldState, newState, secretary);