public bool Equals(positionRecord2 o) { if (o == null) { return(false); } //the distance between any food spawned return(Vector3.Distance(this.position, o.position) < 2f); }
public override bool Equals(System.Object obj) { if (obj == null) { return(false); } positionRecord2 p = obj as positionRecord2; if ((System.Object)p == null) { return(false); } return(position == p.position); }