protected override IEnumerator MoveRoutine(Vector3 destinationPos, float delayTime)
    {
        // disable PlayerCompass arrows
        if (m_playerCompass != null)
        {
            m_playerCompass.ShowArrows(false);
        }

        // run the parent class MoveRoutine
        yield return(StartCoroutine(base.MoveRoutine(destinationPos, delayTime)));

        // update the Board's PlayerNode
        UpdateBoard();

        // enable PlayerCompass arrows
        if (m_playerCompass != null)
        {
            if (faceDestination)
            {
                m_playerCompass.transform.position = transform.position;
            }

            m_playerCompass.ShowArrows(true);
        }

        // broadcast message at the end of movement
        base.finishMovementEvent.Invoke();
    }
예제 #2
0
    protected override IEnumerator MoveRoutine(Vector3 destinationPos, float delayTime)
    {
        if (m_playerCompass != null)
        {
            m_playerCompass.ShowArrows(false);
        }
        yield return(StartCoroutine(base.MoveRoutine(destinationPos, delayTime)));

        UpdateBoard();
        if (m_playerCompass != null)
        {
            m_playerCompass.ShowArrows(true);
        }
        base.finishMovementEvent.Invoke();
    }
예제 #3
0
    protected override IEnumerator MoveRoutine(Vector3 destinationPos, float delayTime)
    {
        // disable compass arrows
        m_playerCompass?.ShowArrows(false);

        // run the base MoveRoutine
        yield return(StartCoroutine(base.MoveRoutine(destinationPos, delayTime)));

        // update the PlayerNode in the board
        UpdateBoard();

        // enable compass arrows
        m_playerCompass?.ShowArrows(true);

        // broadcast end of movement
        base.OnMovementFinished.Invoke();
    }
예제 #4
0
    protected override IEnumerator MoveRoutine(Vector3 destination, float delayTime)
    {
        if (_playerCompass != null)
        {
            _playerCompass.ShowArrows(false);
        }

        //parent class' move routine
        yield return(StartCoroutine(base.MoveRoutine(destination, delayTime)));

        UpdateBoard();
        UpdateNodeStates();
        if (_playerCompass != null)
        {
            _playerCompass.ShowArrows(true);
        }
        base.finishMovementEvent.Invoke();
    }
예제 #5
0
    protected override IEnumerator MoveRoutine(Vector3 destinationPos, float delayTime)
    {
        // disable PlayerCompass arrows
        if (m_playerCompass != null)
        {
            m_playerCompass.ShowArrows(false);
        }

        // run the parent class MoveRoutine
        yield return(StartCoroutine(base.MoveRoutine(destinationPos, delayTime)));

        // update the Board's PlayerNode
        UpdateBoard();

        // enable PlayerCompass arrows
        if (m_playerCompass != null)
        {
            m_playerCompass.ShowArrows(true);
        }

        base.finishMovementEvent.Invoke();
    }
예제 #6
0
    public void DrawGoal()
    {
        if (goalPrefab != null && m_goalNode != null)
        {
            GameObject goalInstance = Instantiate(goalPrefab,
                                                  m_goalNode.transform.position,
                                                  Quaternion.identity);

            iTween.ScaleFrom(goalInstance, iTween.Hash(
                                 "scale", Vector3.zero,
                                 "time", drawGoalTime,
                                 "delay", drawGoalDelay,
                                 "easetype", drawGoalEaseType
                                 ));

            if (m_playerCompass != null)
            {
                m_playerCompass.ShowArrows(true);
            }
        }
    }