UnityEngine.Event.Equals C# (CSharp) Method

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }
            if (object.ReferenceEquals(this, obj))
            {
                return true;
            }
            if (obj.GetType() != base.GetType())
            {
                return false;
            }
            Event event2 = (Event) obj;
            if ((this.type != event2.type) || ((this.modifiers & ~EventModifiers.CapsLock) != (event2.modifiers & ~EventModifiers.CapsLock)))
            {
                return false;
            }
            if (this.isKey)
            {
                return (this.keyCode == event2.keyCode);
            }
            return (this.isMouse && (this.mousePosition == event2.mousePosition));
        }

Usage Example

    static int Equals(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 2);
            UnityEngine.Event obj  = (UnityEngine.Event)ToLua.CheckObject(L, 1, typeof(UnityEngine.Event));
            object            arg0 = ToLua.ToVarObject(L, 2);
            bool o = obj != null?obj.Equals(arg0) : arg0 == null;

            LuaDLL.lua_pushboolean(L, o);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of UnityEngine.Event::Equals