sys 类型

模块: _decorator 父模块: cc

System variables

索引

属性(properties)
方法
  • getBatteryLevel 获取当前设备的电池电量,如果电量无法获取,默认将返回 1
  • getNetworkType 获取当前设备的网络类型, 如果网络类型无法获取,默认将返回 cc.sys.NetworkType.LAN
  • garbageCollect Forces the garbage collection, only available in JSB
  • dumpRoot Dumps rooted objects, only available in JSB
  • restartVM Restart the JS VM, only available in JSB
  • cleanScript Clean a script in the JS VM, only available in JSB
  • 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:41
LANGUAGE_CHINESE

Chinese language code

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

French language code

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

Italian language code

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

German language code

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

Spanish language code

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

Spanish language code

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

Russian language code

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

Korean language code

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

Japanese language code

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

Hungarian language code

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

Portuguese language code

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

Arabic language code

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

Norwegian language code

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

Polish language code

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

Turkish language code

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

Ukrainian language code

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

Romanian language code

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

Bulgarian language code

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

Unknown language code

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:174
OS_IOS
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:181
OS_ANDROID
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:186
OS_WINDOWS
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:191
OS_MARMALADE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:196
OS_LINUX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:201
OS_BADA
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:206
OS_BLACKBERRY
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:211
OS_OSX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:216
OS_WP8
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:221
OS_WINRT
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:226
OS_UNKNOWN
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:231
UNKNOWN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:237
WIN32
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:243
LINUX
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:249
MACOS
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:255
ANDROID
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:261
IPHONE
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:267
IPAD
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:273
BLACKBERRY
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:279
NACL
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:285
EMSCRIPTEN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:291
TIZEN
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:297
WINRT
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:303
WP8
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:309
MOBILE_BROWSER
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:315
DESKTOP_BROWSER
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:321
EDITOR_PAGE

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

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

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

meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:335
WECHAT_GAME
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:342
QQ_PLAY
meta description
类型 Number
定义于 cocos2d/core/platform/CCSys.js:348
BROWSER_TYPE_WECHAT

BROWSER_TYPE_WECHAT

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

BROWSER_TYPE_WECHAT_GAME

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

BROWSER_TYPE_QQ_PLAY

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:371
BROWSER_TYPE_ANDROID
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:378
BROWSER_TYPE_IE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:385
BROWSER_TYPE_QQ
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:392
BROWSER_TYPE_MOBILE_QQ
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:399
BROWSER_TYPE_UC
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:406
BROWSER_TYPE_UCBS

uc third party integration.

meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:413
BROWSER_TYPE_360
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:420
BROWSER_TYPE_BAIDU_APP
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:427
BROWSER_TYPE_BAIDU
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:434
BROWSER_TYPE_MAXTHON
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:441
BROWSER_TYPE_OPERA
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:448
BROWSER_TYPE_OUPENG
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:455
BROWSER_TYPE_MIUI
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:462
BROWSER_TYPE_FIREFOX
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:469
BROWSER_TYPE_SAFARI
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:476
BROWSER_TYPE_CHROME
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:483
BROWSER_TYPE_LIEBAO
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:490
BROWSER_TYPE_QZONE
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:497
BROWSER_TYPE_SOUGOU
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:504
BROWSER_TYPE_UNKNOWN
meta description
类型 String
定义于 cocos2d/core/platform/CCSys.js:511
isNative

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

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

Is web browser ?

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

Indicate whether system is mobile system

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

Indicate the running platform

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

Indicate the current language of the running system

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

Indicate the running os name

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

Indicate the running os version

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

Indicate the running os main version

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

Indicate the running browser type

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

Indicate the running browser version

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

Indicate the real pixel resolution of the whole game window

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

cc.sys.localStorage is a local storage component.

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

The capabilities of the current platform

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

方法

getBatteryLevel

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

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

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

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

Forces the garbage collection, only available in JSB

meta description
定义于 cocos2d/core/platform/CCSys.js:1093
dumpRoot

Dumps rooted objects, only available in JSB

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

Restart the JS VM, only available in JSB

meta description
定义于 cocos2d/core/platform/CCSys.js:1109
cleanScript

Clean a script in the JS VM, only available in JSB

meta description
定义于 cocos2d/core/platform/CCSys.js:1117
参数列表
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:1126
参数列表
dump

Dump system informations

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

Open a url in browser

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

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

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

results matching ""

    No results matching ""