Beispiel #1
0
    public override int GetHashCode()
    {
        int hash = 13;

        hash = (hash * 7) + (!System.Object.ReferenceEquals(null, CurLocation) ? CurLocation.GetHashCode() : 0);
        return(hash);
    }
Beispiel #2
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (FileHash.Length != 0)
        {
            hash ^= FileHash.GetHashCode();
        }
        if (CurLocation.Length != 0)
        {
            hash ^= CurLocation.GetHashCode();
        }
        if (DstLocation.Length != 0)
        {
            hash ^= DstLocation.GetHashCode();
        }
        if (DstType != global::RabbitMsg.Types.DstType.Minio)
        {
            hash ^= DstType.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }
Beispiel #3
0
    public override Node ChildNode(Location loc)
    {
        Vector2 newDir = loc.ToVector() - CurLocation.ToVector();

        PursueNode n = new PursueNode(this, origin, leave, maxDist, targetDir, newDir)
        {
            CurLocation = loc,
            Obstacles   = Obstacles,
        };

        return(n);
    }
Beispiel #4
0
    public override bool Equals(object obj)
    {
        if (ReferenceEquals(null, obj))
        {
            return(false);
        }

        if (ReferenceEquals(this, obj))
        {
            return(true);
        }

        if (obj.GetType() != this.GetType())
        {
            return(false);
        }

        PathNode other = (PathNode)obj;

        return(!System.Object.ReferenceEquals(null, CurLocation) &&
               CurLocation.Equals(other.CurLocation));
    }
Beispiel #5
0
 public override bool IsGoalState()
 {
     return(CurLocation.Equals(dest));
 }