예제 #1
0
 private void OnSecretaryCountChanged(int oldCount, int newCount, SecretaryInfo secretary)
 {
     if (IsLoaded)
     {
         if (newCount > 0)
         {
             SkipState(TutorialStateName.Report);
         }
     }
 }
예제 #2
0
        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}");
                }
            }
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        //public static void OnAuditorAvailableChanged(AuditorInfo auditor)
        //    => AuditorAvailableChanged?.Invoke(auditor);

        public static void OnSecretaryCountChanged(int oldCount, int newCount, SecretaryInfo secretary)
        => SecretaryCountChanged?.Invoke(oldCount, newCount, secretary);
예제 #5
0
 public static void OnSecretaryWorkCircleCompleted(SecretaryInfo secretary, int circleCount)
 => SecretaryWorkCircleCompleted?.Invoke(secretary, circleCount);
예제 #6
0
 public static void OnSecretaryStateChanged(SecretaryState oldState, SecretaryState newState, SecretaryInfo secretary)
 => SecretaryStateChanged?.Invoke(oldState, newState, secretary);