public void Setup()
 {
     m_elementaryState        = ElementaryStates.None;
     m_currentElementaryState = ElementaryStates.None;
     SetIcon();
     SetAlpha(0f);
 }
 private unsafe void OnIconSwitchTweenComplete()
 {
     //IL_0041: Unknown result type (might be due to invalid IL or missing references)
     //IL_004b: Expected O, but got Unknown
     m_currentElementaryState = m_elementaryState;
     SetIcon();
     m_tweener = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 1f, 0.25f), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
 }
 public unsafe void ChangeValue(ElementaryStates value)
 {
     //IL_008e: Unknown result type (might be due to invalid IL or missing references)
     //IL_0098: Expected O, but got Unknown
     //IL_00eb: Unknown result type (might be due to invalid IL or missing references)
     //IL_00f5: Expected O, but got Unknown
     //IL_014b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0155: Expected O, but got Unknown
     if (value == m_elementaryState)
     {
         return;
     }
     if (m_tweener != null)
     {
         TweenExtensions.Kill(m_tweener, false);
         m_tweener = null;
     }
     m_elementaryState = value;
     if (m_currentElementaryState == ElementaryStates.None)
     {
         m_currentElementaryState = value;
         SetIcon();
         float num = Mathf.Lerp(0.25f, 0f, m_alpha);
         if (num > 0f)
         {
             m_tweener = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 1f, num), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
         }
     }
     else if (value == ElementaryStates.None)
     {
         float num2 = Mathf.Lerp(0f, 0.25f, m_alpha);
         if (num2 > 0f)
         {
             m_tweener = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 0f, num2), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
         }
         else
         {
             OnIconChangeTweenComplete();
         }
     }
     else
     {
         float num3 = Mathf.Lerp(0f, 0.25f, m_alpha);
         if (num3 > 0f)
         {
             m_tweener = TweenSettingsExtensions.OnComplete <TweenerCore <float, float, FloatOptions> >(DOTween.To(new DOGetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), new DOSetter <float>((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/), 0f, num3), new TweenCallback((object)this, (IntPtr)(void *) /*OpCode not supported: LdFtn*/));
         }
         else
         {
             OnIconSwitchTweenComplete();
         }
     }
 }
Beispiel #4
0
 public void Initialize(Image ui, ElementaryStates elementaryStates)
 {
     if (elementaryStates == ElementaryStates.None)
     {
         ui.set_sprite(null);
     }
     else
     {
         ((Dictionary <ElementaryStates, Sprite>)m_elementaryStatesSprites).TryGetValue(elementaryStates, out Sprite value);
         ui.set_sprite(value);
     }
     ui.set_enabled(ui.get_sprite() != null);
 }
 public void SetValue(ElementaryStates value)
 {
     if (value != m_elementaryState)
     {
         m_elementaryState        = value;
         m_currentElementaryState = value;
         if (m_tweener != null)
         {
             TweenExtensions.Kill(m_tweener, false);
             m_tweener = null;
         }
         SetIcon();
         SetAlpha((value == ElementaryStates.None) ? 0f : 1f);
     }
 }
Beispiel #6
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_elementaryState = (ElementaryStates)Serialization.JsonTokenValue <int>(jsonObject, "elementaryState", 0);
 }
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_selector        = ISingleEntitySelectorUtils.FromJsonProperty(jsonObject, "selector");
     m_elementaryState = (ElementaryStates)Serialization.JsonTokenValue <int>(jsonObject, "elementaryState", 0);
 }
 private void OnIconChangeTweenComplete()
 {
     m_currentElementaryState = m_elementaryState;
     SetIcon();
     m_tweener = null;
 }
Beispiel #9
0
 public void SetElementaryState(ElementaryStates value)
 {
     elementaryState = value;
     m_elementaryStateUI.ChangeValue(value);
 }
Beispiel #10
0
 public bool HasElementaryState(ElementaryStates elemState)
 {
     return(m_elemState == elemState);
 }
Beispiel #11
0
 public void ChangeElementaryState(ElementaryStates elemState)
 {
     m_elemState = elemState;
 }