sys 类型

模块: _decorator 父模块: cc

System variables

索引

属性(properties)
方法
  • glExtension Is webgl extension support?
  • getMaxJointMatrixSize Get max joint matrix size for skinned mesh renderer.
  • getNetworkType 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 cc.sys.NetworkType.LAN
  • getBatteryLevel 获取当前设备的电池电量,如果电量无法获取,默认将返回 1
  • garbageCollect Forces the garbage collection, only available in JSB
  • restartVM Restart the JS VM, only available in JSB
  • getSafeAreaRect 返回手机屏幕安全区域,目前仅在 iOS 原生平台有效。
  • isObjectValid In web engine, it will return true if the object exist
  • dump Dump system informations
  • openURL Open a url in browser
  • now Get the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

Details

属性(properties)

LANGUAGE_ENGLISH

English language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:52
LANGUAGE_CHINESE

Chinese language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:59
LANGUAGE_FRENCH

French language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:66
LANGUAGE_ITALIAN

Italian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:73
LANGUAGE_GERMAN

German language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:80
LANGUAGE_SPANISH

Spanish language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:87
LANGUAGE_DUTCH

Spanish language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:94
LANGUAGE_RUSSIAN

Russian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:101
LANGUAGE_KOREAN

Korean language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:108
LANGUAGE_JAPANESE

Japanese language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:115
LANGUAGE_HUNGARIAN

Hungarian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:122
LANGUAGE_PORTUGUESE

Portuguese language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:129
LANGUAGE_ARABIC

Arabic language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:136
LANGUAGE_NORWEGIAN

Norwegian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:143
LANGUAGE_POLISH

Polish language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:150
LANGUAGE_TURKISH

Turkish language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:157
LANGUAGE_UKRAINIAN

Ukrainian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:164
LANGUAGE_ROMANIAN

Romanian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:171
LANGUAGE_BULGARIAN

Bulgarian language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:178
LANGUAGE_UNKNOWN

Unknown language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:185
OS_IOS
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:192
OS_ANDROID
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:197
OS_WINDOWS
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:202
OS_MARMALADE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:207
OS_LINUX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:212
OS_BADA
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:217
OS_BLACKBERRY
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:222
OS_OSX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:227
OS_WP8
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:232
OS_WINRT
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:237
OS_UNKNOWN
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:242
UNKNOWN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:248
WIN32
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:254
LINUX
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:260
MACOS
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:266
ANDROID
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:272
IPHONE
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:278
IPAD
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:284
BLACKBERRY
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:290
NACL
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:296
EMSCRIPTEN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:302
TIZEN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:308
WINRT
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:314
WP8
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:320
MOBILE_BROWSER
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:326
DESKTOP_BROWSER
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:332
EDITOR_PAGE

Indicates whether executes in editor's window process (Electron's renderer context)

meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:339
EDITOR_CORE

Indicates whether executes in editor's main process (Electron's browser context)

meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:346
WECHAT_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:353
QQ_PLAY
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:359
FB_PLAYABLE_ADS
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:365
BAIDU_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:371
VIVO_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:377
OPPO_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:383
HUAWEI_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:389
XIAOMI_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:395
JKW_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:401
ALIPAY_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:407
WECHAT_GAME_SUB
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:413
BAIDU_GAME_SUB
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:419
QTT_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:425
BROWSER_TYPE_WECHAT

BROWSER_TYPE_WECHAT

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:431
BROWSER_TYPE_WECHAT_GAME

BROWSER_TYPE_WECHAT_GAME

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:438
BROWSER_TYPE_WECHAT_GAME_SUB

BROWSER_TYPE_WECHAT_GAME_SUB

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:445
BROWSER_TYPE_BAIDU_GAME

BROWSER_TYPE_BAIDU_GAME

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:452
BROWSER_TYPE_BAIDU_GAME_SUB

BROWSER_TYPE_BAIDU_GAME_SUB

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:459
BROWSER_TYPE_XIAOMI_GAME

BROWSER_TYPE_XIAOMI_GAME

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:466
BROWSER_TYPE_ALIPAY_GAME

BROWSER_TYPE_ALIPAY_GAME

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:473
BROWSER_TYPE_QQ_PLAY

BROWSER_TYPE_QQ_PLAY

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:480
BROWSER_TYPE_ANDROID
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:487
BROWSER_TYPE_IE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:494
BROWSER_TYPE_EDGE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:501
BROWSER_TYPE_QQ
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:508
BROWSER_TYPE_MOBILE_QQ
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:515
BROWSER_TYPE_UC
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:522
BROWSER_TYPE_UCBS

uc third party integration.

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:529
BROWSER_TYPE_360
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:536
BROWSER_TYPE_BAIDU_APP
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:543
BROWSER_TYPE_BAIDU
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:550
BROWSER_TYPE_MAXTHON
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:557
BROWSER_TYPE_OPERA
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:564
BROWSER_TYPE_OUPENG
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:571
BROWSER_TYPE_MIUI
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:578
BROWSER_TYPE_FIREFOX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:585
BROWSER_TYPE_SAFARI
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:592
BROWSER_TYPE_CHROME
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:599
BROWSER_TYPE_LIEBAO
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:606
BROWSER_TYPE_QZONE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:613
BROWSER_TYPE_SOUGOU
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:620
BROWSER_TYPE_UNKNOWN
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:627
isNative

Is native ? This is set to be true in jsb auto.

meta description
类型 Boolean
定义于 cocos2d/core/platform/CCSys.js:635
isBrowser

Is web browser ?

meta description
类型 Boolean
定义于 cocos2d/core/platform/CCSys.js:642
isMobile

Indicate whether system is mobile system

meta description
类型 Boolean
定义于 cocos2d/core/platform/CCSys.js:786
platform

Indicate the running platform

meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:792
languageCode

Get current language iso 639-1 code. Examples of valid language codes include "zh-tw", "en", "en-us", "fr", "fr-fr", "es-es", etc. The actual value totally depends on results provided by destination platform.

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:807
language

Indicate the current language of the running system

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:817
os

Indicate the running os name

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:856
osVersion

Indicate the running os version

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:861
osMainVersion

Indicate the running os main version

meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:866
browserType

Indicate the running browser type

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:872
browserVersion

Indicate the running browser version

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:903
windowPixelResolution

Indicate the real pixel resolution of the whole game window

meta description
类型 Size
定义于 cocos2d/core/platform/CCSys.js:921
localStorage

cc.sys.localStorage is a local storage component.

meta description
类型 Object
定义于 cocos2d/core/platform/CCSys.js:954
capabilities

The capabilities of the current platform

meta description
类型 Object
定义于 cocos2d/core/platform/CCSys.js:985

方法

glExtension

Is webgl extension support?

meta description
定义于 cocos2d/core/platform/CCSys.js:648
参数列表
  • name Unknown
getMaxJointMatrixSize

Get max joint matrix size for skinned mesh renderer.

meta description
定义于 cocos2d/core/platform/CCSys.js:657
getNetworkType

获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 cc.sys.NetworkType.LAN

meta description
返回 NetworkType
定义于 cocos2d/core/platform/CCSys.js:1135
getBatteryLevel

获取当前设备的电池电量,如果电量无法获取,默认将返回 1

meta description
返回 Number
定义于 cocos2d/core/platform/CCSys.js:1149
garbageCollect

Forces the garbage collection, only available in JSB

meta description
定义于 cocos2d/core/platform/CCSys.js:1163
restartVM

Restart the JS VM, only available in JSB

meta description
定义于 cocos2d/core/platform/CCSys.js:1171
getSafeAreaRect

返回手机屏幕安全区域,目前仅在 iOS 原生平台有效。其它平台将默认返回设计分辨率尺寸。

meta description
返回 Rect
定义于 cocos2d/core/platform/CCSys.js:1179
isObjectValid

Check whether an object is valid, In web engine, it will return true if the object exist In native engine, it will return true if the JS object and the correspond native object are both valid

meta description
返回 Boolean
定义于 cocos2d/core/platform/CCSys.js:1193
参数列表
dump

Dump system informations

meta description
定义于 cocos2d/core/platform/CCSys.js:1208
openURL

Open a url in browser

meta description
定义于 cocos2d/core/platform/CCSys.js:1227
参数列表
now

Get the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC.

meta description
返回 Number
定义于 cocos2d/core/platform/CCSys.js:1241

results matching ""

    No results matching ""