예제 #1
0
    //PUSH DOWN
    public void PushDown()
    {
        if (m_player.hasLightBulb)
        {
            Node EnemyNode = m_board.FindNodeAt(transform.position);

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

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