UnityEngine.BoneWeight.Equals C# (CSharp) Method

Equals() public method

public Equals ( object other ) : bool
other object
return bool
        public override bool Equals(object other)
        {
            Vector4 vector;
            System.Boolean ReflectorVariable0;
            if (!(other is BoneWeight))
            {
                return false;
            }
            BoneWeight weight = (BoneWeight) other;
            if ((this.boneIndex0.Equals(weight.boneIndex0) && this.boneIndex1.Equals(weight.boneIndex1)) && (this.boneIndex2.Equals(weight.boneIndex2) && this.boneIndex3.Equals(weight.boneIndex3)))
            {
                vector = new Vector4(this.weight0, this.weight1, this.weight2, this.weight3);
                ReflectorVariable0 = true;
            }
            else
            {
                ReflectorVariable0 = false;
            }
            return (ReflectorVariable0 ? vector.Equals(new Vector4(weight.weight0, weight.weight1, weight.weight2, weight.weight3)) : false);
        }

Usage Example

Example #1
0
// methods

    static bool BoneWeight_Equals__Object(JSVCall vc, int argc)
    {
        int len = argc;

        if (len == 1)
        {
            System.Object          arg0    = (System.Object)JSMgr.datax.getWhatever((int)JSApi.GetType.Arg);
            UnityEngine.BoneWeight argThis = (UnityEngine.BoneWeight)vc.csObj;                JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(argThis.Equals(arg0)));
            JSMgr.changeJSObj(vc.jsObjID, argThis);
        }

        return(true);
    }