Ejemplo n.º 1
0
    public void PushRight()
    {
        if (m_player.hasLightBulb)
        {
            Node EnemyNode = m_board.FindNodeAt(transform.position);

            if (m_board.playerNode.transform.position.z == EnemyNode.transform.position.z && Vector3.Distance(EnemyNode.transform.position, m_board.playerNode.transform.position) < 3f && m_board.playerNode.transform.position.x < EnemyNode.transform.position.x)
            {
                Debug.Log("MoveRight");
                m_enemyMover.MoveRight();

                m_enemyMover.destination = m_player.transform.position;
                m_enemyMover.FaceDestination();
                m_player.clearPlayerPath();
                m_enemyMover.firstChaserMove = false;
            }
        }
    }