Beispiel #1
0
        public override SteeringOutput GetSteering()
        {
            // no KS? get it
            if (this.ownKS == null)
            {
                this.ownKS = GetComponent <KinematicState>();
            }

            return(KeepDistance.GetSteering(this.ownKS, this.target, this.requiredDistance));
        }
        public override SteeringOutput GetSteering()
        {
            if (this.ownKS == null)
            {
                this.ownKS = GetComponent <KinematicState>();
            }

            if (this.target == null)
            {
                Debug.Log("Null target in Seek of " + this.gameObject);
            }

            SteeringOutput result = KeepDistance.GetSteering(this.ownKS, this.target, requiredDistance);

            base.applyRotationalPolicy(rotationalPolicy, result, this.target);
            return(result);
        }