예제 #1
0
    public void PushLeft()
    {
        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("MoveLeft");
                m_enemyMover.MoveLeft();

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