File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212- BiliveObserver 使用以上两个节点完成直播间信息的获取、解析,并发送相应的信号。
1313> 也可以不使用 BiliveObserver 节点,直接通过 BiliveAPI 和 BiliveClient 实现你自己的直播弹幕处理逻辑。
1414> live_api.json 存储了一部分用户信息和直播信息的 API。我这里只用到了获取直播间信息和获取用户信息和头像的 API。
15+
16+ ## 其它:
17+ demo 默认连接的是本人的直播间,如果测试的话注意修改直播间 ID。
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ script = ExtResource("1_q7ja4")
1616script = ExtResource ("1_gmrmo" )
1717
1818[node name ="VBoxContainer" type ="VBoxContainer" parent ="." ]
19- layout_mode = 1
2019anchors_preset = 15
2120anchor_right = 1.0
2221anchor_bottom = 1.0
@@ -25,17 +24,14 @@ grow_vertical = 2
2524
2625[node name ="Popularity" type ="Label" parent ="VBoxContainer" ]
2726unique_name_in_owner = true
28- layout_mode = 2
2927text = "在线人数:"
3028
3129[node name ="ScrollContainer" type ="ScrollContainer" parent ="VBoxContainer" ]
32- layout_mode = 2
3330size_flags_horizontal = 3
3431size_flags_vertical = 3
3532
3633[node name ="Message" type ="VBoxContainer" parent ="VBoxContainer/ScrollContainer" ]
3734unique_name_in_owner = true
38- layout_mode = 2
3935
4036[connection signal ="danmu_received" from ="BiliveObserver" to ="." method ="_on_bilive_observer_danmu_received" ]
4137[connection signal ="popularity_received" from ="BiliveObserver" to ="." method ="_on_bilive_observer_popularity_received" ]
Original file line number Diff line number Diff line change @@ -11,16 +11,10 @@ grow_vertical = 2
1111script = ExtResource ("1_q3gya" )
1212
1313[node name ="Avatar" type ="TextureRect" parent ="." ]
14- offset_bottom = 648.0
14+ layout_mode = 2
1515
1616[node name ="Name" type ="Label" parent ="." ]
17- offset_left = 4.0
18- offset_top = 312.0
19- offset_right = 5.0
20- offset_bottom = 336.0
17+ layout_mode = 2
2118
2219[node name ="Info" type ="Label" parent ="." ]
23- offset_left = 9.0
24- offset_top = 312.0
25- offset_right = 10.0
26- offset_bottom = 336.0
20+ layout_mode = 2
You can’t perform that action at this time.
0 commit comments