예제 #1
0
 static StackObject *AssignFromStack_onClick_0(ref object o, ILIntepreter __intp, StackObject *ptr_of_this_method, IList <object> __mStack)
 {
     ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
     UnityEngine.Events.UnityEvent          @onClick = (UnityEngine.Events.UnityEvent) typeof(UnityEngine.Events.UnityEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
     ((global::PointerClick)o).onClick = @onClick;
     return(ptr_of_this_method);
 }
예제 #2
0
        public EditableConversation DeserializeForEditor()
        {
            // Dejsonify
            EditableConversation conversation = Dejsonify();

            if (conversation != null)
            {
                // Deserialize the indivudual nodes
                {
                    if (conversation.SpeechNodes != null)
                    {
                        for (int i = 0; i < conversation.SpeechNodes.Count; i++)
                        {
                            conversation.SpeechNodes[i].Deserialize(this);
                        }
                    }

                    if (conversation.Options != null)
                    {
                        for (int i = 0; i < conversation.Options.Count; i++)
                        {
                            conversation.Options[i].Deserialize(this);
                        }
                    }
                }
            }

            // Clear our dummy event
            Event = new UnityEngine.Events.UnityEvent();

            return(conversation);
        }
예제 #3
0
 public static void Notify <T>(this UnityEngine.Events.UnityEvent <T> ev, T param)
 {
     if (ev != null)
     {
         ev.Invoke(param);
     }
 }
예제 #4
0
 internal void CheckInput(vItem item, UnityEngine.Events.UnityEvent onEquip)
 {
     if (input.GetButtonDown())
     {
         Equip(item);
         onEquip?.Invoke();
     }
 }
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new UnityEngine.Events.UnityEvent();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
예제 #6
0
        private void Awake()
        {
            if (this.tracer.onTailReachedDestination == null)
            {
                this.tracer.onTailReachedDestination = new UnityEngine.Events.UnityEvent();
            }

            UnityEngine.Events.UnityEvent uEvent = this.tracer.onTailReachedDestination;
            uEvent.AddListener(new UnityEngine.Events.UnityAction(() => this.StartCoroutine(this.DestroyOnTimer(this.delay))));
        }
예제 #7
0
파일: FogOfWar.cs 프로젝트: KGtingfeng/test
        void Awake()
        {
            if (_ids == null)
            {
                _ids = new FoWIDs();
                _ids.Initialise();
            }

            onRenderFogTexture = new UnityEngine.Events.UnityEvent();

            Reinitialize();
        }
        void OnSceneGUI()
        {
            FollowSpline fs = target as FollowSpline;

            if (fs.splineWindow == null)
            {
                return;
            }
            if (fs.splineWindow.spline == null)
            {
                return;
            }
            if (fs.events == null)
            {
                fs.events = new UnityEngine.Events.UnityEvent[0];
            }
            if (fs.events.Length != fs.splineWindow.spline.Length)
            {
                var events = new UnityEngine.Events.UnityEvent[fs.splineWindow.spline.Length];
                for (int i = 0; i < fs.events.Length; i++)
                {
                    if (i < events.Length)
                    {
                        events[i] = fs.events[i];
                    }
                }
                fs.events = events;

                Repaint();
                return;
            }

            if (draw)
            {
                float size = 0;
                for (int i = 0; i < fs.splineWindow.spline.Length; i++)
                {
                    Vector3 pos = fs.splineWindow.spline.GetPosition(i);
                    size = HandleUtility.GetHandleSize(pos);
                    if (Handles.Button(pos, Quaternion.identity, size / 4, size / 4, Handles.SphereCap))
                    {
                        index = i;
                        Repaint();
                    }
                }

                Handles.color = Color.red;
                size          = HandleUtility.GetHandleSize(fs.splineWindow.spline.GetPosition(index));
                Handles.SphereCap(0, (fs.splineWindow.spline.GetPosition(index)), Quaternion.identity, size / 2);
            }
        }
        // Use this for initialization
        void Start()
        {
            if (OnWellFed == null)
            {
                OnWellFed = new UnityEngine.Events.UnityEvent();
            }
            if (slider != null)
            {
                slider.maxValue = maxFoodEaten;
                slider.value    = foodEaten;
            }

            OnWellFed.AddListener(FindObjectOfType <MonkeyGameController>().doWin);
        }
예제 #10
0
        static StackObject *Invoke_2(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, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            UnityEngine.Events.UnityEvent instance_of_this_method = (UnityEngine.Events.UnityEvent) typeof(UnityEngine.Events.UnityEvent).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Invoke();

            return(__ret);
        }
        int __CreateInstanceUnityEngineEventsUnityEvent(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;

            if (gen_param_count == 1)
            {
                UnityEngine.Events.UnityEvent gen_ret = new UnityEngine.Events.UnityEvent();
                translator.Push(L, gen_ret);

                return(1);
            }


            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Events.UnityEvent constructor!"));
        }
예제 #12
0
 static public int Invoke(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <String> self = checkSelf <UnityEngine.Events.UnityEvent <String> >(l);
         String o;
         checkType(l, 2, out o);
         self.Invoke(o);
         return(0);
     }
     catch (Exception e)
     {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
        static public int AddListener(IntPtr l)
        {
            try
            {
                UnityEngine.Events.UnityEvent<UnityEngine.Vector2> self = checkSelf<UnityEngine.Events.UnityEvent<UnityEngine.Vector2>>(l);
                UnityEngine.Events.UnityAction<UnityEngine.Vector2> a1;
                checkType(l, 2, out a1);
                self.AddListener(a1);
				pushValue(l,true);
                return 1;
            }
            catch (Exception e)
            {
				return error(l,e);
            }
        }
        int UnityEngineEventsUnityEvent_m_Invoke(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Events.UnityEvent gen_to_be_invoked = (UnityEngine.Events.UnityEvent)translator.FastGetCSObj(L, 1);


            {
                gen_to_be_invoked.Invoke(  );



                return(0);
            }
        }
 static public int RemoveListener(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <int>  self = checkSelf <UnityEngine.Events.UnityEvent <int> >(l);
         UnityEngine.Events.UnityAction <int> a1;
         checkType(l, 2, out a1);
         self.RemoveListener(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
예제 #16
0
 static public int AddListener(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <FSocketStateChanged>  self = checkSelf <UnityEngine.Events.UnityEvent <FSocketStateChanged> >(l);
         UnityEngine.Events.UnityAction <FSocketStateChanged> a1;
         checkType(l, 2, out a1);
         self.AddListener(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
예제 #17
0
 static public int RemoveListener(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <String>  self = checkSelf <UnityEngine.Events.UnityEvent <String> >(l);
         UnityEngine.Events.UnityAction <String> a1;
         checkType(l, 2, out a1);
         self.RemoveListener(a1);
         return(0);
     }
     catch (Exception e)
     {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int AddListener(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <ButtonEx.FDragData>  self = checkSelf <UnityEngine.Events.UnityEvent <ButtonEx.FDragData> >(l);
         UnityEngine.Events.UnityAction <ButtonEx.FDragData> a1;
         checkType(l, 2, out a1);
         self.AddListener(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
예제 #19
0
 static public int Invoke(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <int> self = checkSelf <UnityEngine.Events.UnityEvent <int> >(l);
         int o;
         checkType(l, 2, out o);
         self.Invoke(o);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
        static public int Invoke(IntPtr l)
        {
            try
            {
                UnityEngine.Events.UnityEvent<UnityEngine.Vector2> self = checkSelf<UnityEngine.Events.UnityEvent<UnityEngine.Vector2>>(l);
				UnityEngine.Vector2 a0;
				checkType(l,2,out a0);
				self.Invoke(a0);

				pushValue(l,true);
                return 1;
            }
            catch (Exception e)
            {
                return error(l,e);
            }
        }
예제 #21
0
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    UnityEngine.Events.UnityEvent <string> gen_ret = new UnityEngine.Events.UnityEvent <string>();
                    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.Events.UnityEvent<string> constructor!"));
        }
예제 #22
0
 static public int AddListener(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <float>  self = checkSelf <UnityEngine.Events.UnityEvent <float> >(l);
         UnityEngine.Events.UnityAction <float> a1;
         checkType(l, 2, out a1);
         self.AddListener(a1);
         // pushValue(l,true);
         // return 1;
         return(0);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
예제 #23
0
        } //END IsFloorTrackerIconEnabled

        //------------------------------------//
        public override void EnableFloorTrackerIcon()
        //------------------------------------//
        {
#if VUFORIA
            if ( floorIconColorTweener != null )
            {
                UnityEngine.Events.UnityEvent _event = new UnityEngine.Events.UnityEvent();
                _event.AddListener(EnableFloorTrackerIconComplete);

                floorIconColorTweener.Play( UITweener.TweenValue.Show, _event );

                //DOB NOTE: This is a hack to track when floor tracking is restored by looking at when the tracking icon is re-enabled
                SendFloorTrackingFoundEvent();
            }
#endif

        } //END EnableFloorTrackerIcon
        static public int Invoke(IntPtr l)
        {
            try
            {
                UnityEngine.Events.UnityEvent <ButtonEx.FDragData> self = checkSelf <UnityEngine.Events.UnityEvent <ButtonEx.FDragData> >(l);
                ButtonEx.FDragData a0;
                checkType(l, 2, out a0);
                self.Invoke(a0);

                pushValue(l, true);
                return(1);
            }
            catch (Exception e)
            {
                return(error(l, e));
            }
        }
 static public int Invoke(IntPtr l)
 {
     try
     {
         UnityEngine.Events.UnityEvent <UnityEngine.Color> self = checkSelf <UnityEngine.Events.UnityEvent <UnityEngine.Color> >(l);
         UnityEngine.Color o;
         checkType(l, 2, out o);
         self.Invoke(o);
         // pushValue(l,true);
         // return 1;
         return(0);
     }
     catch (Exception e)
     {
         return(error(l, e));
     }
 }
        static public int Invoke(IntPtr l)
        {
            try
            {
                UnityEngine.Events.UnityEvent <UnityEngine.Transform> self = checkSelf <UnityEngine.Events.UnityEvent <UnityEngine.Transform> >(l);
                UnityEngine.Transform a0;
                checkType(l, 2, out a0);
                self.Invoke(a0);

                pushValue(l, true);
                return(1);
            }
            catch (Exception e)
            {
                return(error(l, e));
            }
        }
예제 #27
0
        static public int Invoke(IntPtr l)
        {
            try
            {
                UnityEngine.Events.UnityEvent <FSocketStateChanged> self = checkSelf <UnityEngine.Events.UnityEvent <FSocketStateChanged> >(l);
                FSocketStateChanged a0;
                checkType(l, 2, out a0);
                self.Invoke(a0);

                pushValue(l, true);
                return(1);
            }
            catch (Exception e)
            {
                return(error(l, e));
            }
        }
        static StackObject *RemoveListener_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);
            UnityEngine.Events.UnityAction <System.Single> @call = (UnityEngine.Events.UnityAction <System.Single>) typeof(UnityEngine.Events.UnityAction <System.Single>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 8);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            UnityEngine.Events.UnityEvent <System.Single> instance_of_this_method = (UnityEngine.Events.UnityEvent <System.Single>) typeof(UnityEngine.Events.UnityEvent <System.Single>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags) 0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.RemoveListener(@call);

            return(__ret);
        }
        static StackObject *AddListener_0(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);
            UnityEngine.Events.UnityAction @call = (UnityEngine.Events.UnityAction) typeof(UnityEngine.Events.UnityAction).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

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

            instance_of_this_method.AddListener(@call);

            return(__ret);
        }
        int UnityEngineEventsUnityEvent_m_RemoveListener(RealStatePtr L, int gen_param_count)
        {
            ObjectTranslator translator = this;


            UnityEngine.Events.UnityEvent gen_to_be_invoked = (UnityEngine.Events.UnityEvent)translator.FastGetCSObj(L, 1);


            {
                UnityEngine.Events.UnityAction _call = translator.GetDelegate <UnityEngine.Events.UnityAction>(L, 2);

                gen_to_be_invoked.RemoveListener(_call);



                return(0);
            }
        }
예제 #31
0
        void OnSceneGUI()
        {
            FollowSpline fs = target as FollowSpline;
            if (fs.splineWindow == null) return;
            if (fs.splineWindow.spline == null) return;
            if (fs.events == null)
            {
                fs.events = new UnityEngine.Events.UnityEvent[0];
            }
            if (fs.events.Length != fs.splineWindow.spline.Length)
            {
                var events = new UnityEngine.Events.UnityEvent[fs.splineWindow.spline.Length];
                for (int i = 0; i < fs.events.Length; i++)
                {
                    if (i < events.Length) events[i] = fs.events[i];
                }
                fs.events = events;

                Repaint();
                return;

            }

            if (draw)
            {
                float size = 0;
                for (int i = 0; i < fs.splineWindow.spline.Length; i++)
                {
                    Vector3 pos = fs.splineWindow.spline.GetPosition(i);
                    size = HandleUtility.GetHandleSize(pos);
                    if (Handles.Button(pos, Quaternion.identity, size / 3, size, Handles.SphereCap))
                    {
                        index = i;
                        Repaint();
                    }
                }

                Handles.color = Color.red;
                size = HandleUtility.GetHandleSize(fs.splineWindow.spline.GetPosition(index));
                Handles.SphereCap(0, (fs.splineWindow.spline.GetPosition(index)), Quaternion.identity, size / 2);
            }
        }