private IMovementBehavior GetNextBehavior() { var attractorNearby = BigDog.GetClosest(); //Debug.Log(attractorNearby); if (attractorNearby == null) { return(this); } else { return(new WalkTowardOther()); } }
private IMovementBehavior GetBehavior() { var closestBigDog = BigDog.GetClosest(); if (closestBigDog != null) { return(new WalkTowardOther()); } if (this.RemainingDistance < this.threshold) { return(new OscillateSideways(Dog.MovmentThisFrame)); } else { return(this); } }