コード例 #1
0
        private IMovementBehavior GetNextBehavior()
        {
            var attractorNearby = BigDog.GetClosest();

            //Debug.Log(attractorNearby);
            if (attractorNearby == null)
            {
                return(this);
            }
            else
            {
                return(new WalkTowardOther());
            }
        }
コード例 #2
0
        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);
            }
        }