void DoSetValue()
		{
			if (_selectable==null)
			{
				return;
			}
			
			_animationTriggers = _selectable.animationTriggers;

			if (!normalTrigger.IsNone)
			{
				_animationTriggers.normalTrigger = normalTrigger.Value;
			}
			if (!highlightedTrigger.IsNone)
			{
				_animationTriggers.highlightedTrigger = highlightedTrigger.Value;
			}
			if (!pressedTrigger.IsNone)
			{
				_animationTriggers.pressedTrigger = pressedTrigger.Value;
			}
			if (!disabledTrigger.IsNone)
			{
				_animationTriggers.disabledTrigger = disabledTrigger.Value;
			}

			_selectable.animationTriggers = _animationTriggers;
		}
Example #2
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    var gen_ret = new UnityEngine.UI.AnimationTriggers();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.UI.AnimationTriggers constructor!"));
        }
		public override void OnEnter()
		{
			GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject);
			if (_go!=null)
			{
				_selectable = _go.GetComponent<UnityEngine.UI.Selectable>();
			}

			if (_selectable!=null && resetOnExit.Value)
			{
				_originalAnimationTriggers = _selectable.animationTriggers;
			}

			DoSetValue();
		
			Finish();
		}
        static StackObject *set_animationTriggers_10(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.UI.AnimationTriggers value = (UnityEngine.UI.AnimationTriggers) typeof(UnityEngine.UI.AnimationTriggers).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.Selectable instance_of_this_method;
            instance_of_this_method = (UnityEngine.UI.Selectable) typeof(UnityEngine.UI.Selectable).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.animationTriggers = value;

            return(__ret);
        }
        public override void OnEnter()
        {
            GameObject _go = Fsm.GetOwnerDefaultTarget(gameObject);

            if (_go != null)
            {
                _selectable = _go.GetComponent <UnityEngine.UI.Selectable>();
            }

            if (_selectable != null && resetOnExit.Value)
            {
                _originalAnimationTriggers = _selectable.animationTriggers;
            }

            DoSetValue();

            Finish();
        }
        static StackObject *set_normalTrigger_1(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.String @value = (System.String) typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.UI.AnimationTriggers instance_of_this_method = (UnityEngine.UI.AnimationTriggers) typeof(UnityEngine.UI.AnimationTriggers).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.normalTrigger = value;

            return(__ret);
        }
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.UI.AnimationTriggers animationTriggers = new UnityEngine.UI.AnimationTriggers();
     ReadInto(animationTriggers, reader);
     return(animationTriggers);
 }