Canguro.Controller.Snap.LineMagnet.Equals C# (CSharp) 메소드

Equals() 공개 메소드

public Equals ( object obj ) : bool
obj object
리턴 bool
        public override bool Equals(object obj)
        {
            LineMagnet lm = obj as LineMagnet;
            if (lm != null)
            {
                if (line == null && lm.line == null)
                {
                    if (direction == lm.direction)
                        return true;
                    else
                        return false;
                }
                else if ((line != null && lm.line == null) || (line == null && lm.line != null))
                    return false;
                else if (line != null && lm.line != null)
                    return (line == lm.line);
            }

            return (line == obj);
        }