当前位置:网站首页>【CocosCreator 3.5】CocosCreator 获取网络状态
【CocosCreator 3.5】CocosCreator 获取网络状态
2022-07-31 02:58:00 【CN-Dust】
Cocos自带有api获取网络状态
/**获取网络状态 */
public getNetwork() {
/** * 0: "NONE" * 1: "LAN" * 2: "WWAN" * LAN: 1 * NONE: 0 * WWAN: 2 */
return cc.sys.getNetworkType();
}
也可以打印cc.sys.NetworkType查看这些值对应的含义。
边栏推荐
- LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING
- 自动化办公案例:如何自动生成期数据?
- JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply
- 跨专业考研难度大?“上岸”成功率低?这份实用攻略请收下!
- The difference between link and @import
- 【Android】Room —— SQLite的替代品
- The whole process scheduling, MySQL and Sqoop
- execsnoop 工具
- Android's webview cache related knowledge collection
- 2022牛客多校联赛第四场 题解
猜你喜欢

【C语言】求两个整数m和n的最大公因数和最小公倍数之和一般方法,经典解法

刚出道“一战成名”,安全、舒适一个不落

CefSharp入门-winform

Installation, start and stop of redis7 under Linux

YOLOV5学习笔记(三)——网络模块详解

SQL injection Less54 (limited number of SQL injection + union injection)

CorelDRAW2022 streamlined Asia Pacific new features in detail
![LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING](/img/56/fcc8ee6f592abf0a374fc950a3362f.png)
LeetCode 1161 The largest element in the layer and the LeetCode road of [BFS binary tree] HERODING

学习DAVID数据库(1)

12 Disk related commands
随机推荐
Modbus on AT32 MCUs
The modification is not properly placed in the sandbox, causing Apple compatibility issues
Clustering index, and what is the difference between a clustering index
SQALE 是什么
Maximum area of solar panel od js
The simulation application of common mode inductance is here, full of dry goods for everyone
STM32CUBEMX develops GD32F303 (11) ---- ADC scans multiple channels in DMA mode
【shell基础】判断目录是否为空
VS QT——ui不显示新添加成员(控件)||代码无提示
JetPack component Databinding
跨专业考研难度大?“上岸”成功率低?这份实用攻略请收下!
MPPT太阳能充放电控制器数据采集-通过网关采集电池电压容量电量SOC,wifi传输
JS 函数 this上下文 运行时点语法 圆括号 数组 IIFE 定时器 延时器 self.备份上下文 call apply
关于 mysql8.0数据库中主键位id,使用replace插入id为0时,实际id插入后自增导致数据重复插入 的解决方法
【C语言】求两个整数m和n的最大公因数和最小公倍数之和一般方法,经典解法
Brute Force/Adjacency List Breadth First Directed Weighted Graph Undirected Weighted Graph
知识蒸馏7:知识蒸馏代码详解
Why is String immutable?
Moxa NPort device flaw could expose critical infrastructure to devastating attack
19. Support Vector Machines - Intuitive Understanding of Optimization Objectives and Large Spacing