示例#1
0
 public void setDelegates(WaypointReached wpr, StartMovingToWaypoint smw, MovingStopped ms, MovingToWaypoint mt, SingleMovementFinished sm)
 {
     this.waypointReached        = wpr;
     this.startMovingToWaypoint  = smw;
     this.movingStopped          = ms;
     this.movingToWaypoint       = mt;
     this.singleMovementFinished = sm;
 }
示例#2
0
        public void AddWayPoint(Vector3 position, Quaternion rotation, float speedRatio, float delay, WaypointReached callback, object cookie)
        {
            this.positions.Add(position);
            this.rotations.Add(rotation);
            this.speeds.Add(this.speedBase * speedRatio);
            this.delays.Add(delay);
            this.callbacks.Add(callback);
            this.cookies.Add(cookie);
            int count = this.positions.Count;

            if (count > 1)
            {
                this.distances.Add(Vector3.Distance(this.positions[count - 1], this.positions[count - 2]));
            }
        }