예제 #1
0
        //----------------------------------------------------------------------------
        //              MoveToDestination
        //----------------------------------------------------------------------------

        #region MoveToDestination
        /// <summary>
        /// The forking function- <para/>
        /// If the end of the path has not been reached, move a single hex forward <para/>
        /// Otherwise, end the movement <para/>
        /// Any kind of effect a hex will have on a hex content will probably be applied here
        /// </summary>
        public IEnumerator MoveToDestination()
        {
            while (PathLength > 0)
            {
                yield return(StartCoroutine(StepDownPath()));
            }

            MyMovementController.EndMove();
        }