Exemplo n.º 1
0
 private void OnSecretaryCountChanged(int oldCount, int newCount, SecretaryInfo secretary)
 {
     if (IsLoaded)
     {
         if (newCount > 0)
         {
             SkipState(TutorialStateName.Report);
         }
     }
 }
Exemplo n.º 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}");
                }
            }
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
Exemplo n.º 5
0
 public static void OnSecretaryWorkCircleCompleted(SecretaryInfo secretary, int circleCount)
 => SecretaryWorkCircleCompleted?.Invoke(secretary, circleCount);
Exemplo n.º 6
0
 public static void OnSecretaryStateChanged(SecretaryState oldState, SecretaryState newState, SecretaryInfo secretary)
 => SecretaryStateChanged?.Invoke(oldState, newState, secretary);