示例#1
0
 public void RaiseEvent(UIEventChannel channel)
 {
     if (OnEventRaised != null)
     {
         OnEventRaised.Invoke(channel);
     }
 }
示例#2
0
 public void SetChannelForActions(UIEventChannel ch)
 {
     Init();
     foreach (CAction action in actions)
     {
         action.actionObj.GetComponent <IEventEmitter <AEventData> >().ChannelToEmit = ch;
     }
 }
示例#3
0
 public void SetChannelForSelections(UIEventChannel ch)
 {
     Init();
     foreach (CSelection sel in selections)
     {
         var emitter = sel.selectionObj.GetEmitter <AEventData>();
         if (emitter != null)
         {
             emitter.ChannelToEmit = ch;
         }
     }
 }
示例#4
0
 public virtual void Validate(UIEventChannel eventChannel)
 {
     if (!Paused && !steps[currentHighestStepIndex].notAffected)
     {
         bool succesfulValidation = true;
         int  border = downfall ? 0 : currentHighestStepIndex;
         for (int i = currentHighestStepIndex; i >= border; i--)
         {
             succesfulValidation = steps[i].step.HasEventChannel(eventChannel);
             if (succesfulValidation)
             {
                 break;
             }
         }
         Debug.Log("validation succesful?");
         Debug.Log(succesfulValidation);
         if (!succesfulValidation)
         {
             WrongEventOccurs.Invoke();
         }
     }
 }
示例#5
0
 public bool HasEventChannel(UIEventChannel ch)
 {
     return(eventChannels.Contains(ch));
 }
示例#6
0
 public bool HasEventChannel(UIEventChannel ch)
 {
     return(eventChannel == ch);
 }