예제 #1
0
 private void SetState(GeneratorButtonState newState, bool isForceEvent = false)
 {
     UpdateButtonText(newState);
     if (State != newState || isForceEvent)
     {
         State = newState;
         GameEvents.OnGeneratorButtonStateChanged(GeneratorId, GetBuyInfo());
     }
     if (Generator != null)
     {
         Generator.SetBuyCountButtonState((int)State);
     }
 }
예제 #2
0
 private void UpdateButtonText(GeneratorButtonState state)
 {
     buttonText.text = "x".Colored("#F1FF00") + buttonStateTexts[state];
 }