sys Class

Module: _decorator Parent Module: cc

System variables

Index

Properties
Methods
  • 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 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
  • 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
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:39
LANGUAGE_CHINESE

Chinese language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:46
LANGUAGE_FRENCH

French language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:53
LANGUAGE_ITALIAN

Italian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:60
LANGUAGE_GERMAN

German language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:67
LANGUAGE_SPANISH

Spanish language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:74
LANGUAGE_DUTCH

Spanish language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:81
LANGUAGE_RUSSIAN

Russian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:88
LANGUAGE_KOREAN

Korean language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:95
LANGUAGE_JAPANESE

Japanese language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:102
LANGUAGE_HUNGARIAN

Hungarian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:109
LANGUAGE_PORTUGUESE

Portuguese language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:116
LANGUAGE_ARABIC

Arabic language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:123
LANGUAGE_NORWEGIAN

Norwegian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:130
LANGUAGE_POLISH

Polish language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:137
LANGUAGE_TURKISH

Turkish language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:144
LANGUAGE_UKRAINIAN

Ukrainian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:151
LANGUAGE_ROMANIAN

Romanian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:158
LANGUAGE_BULGARIAN

Bulgarian language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:165
LANGUAGE_UNKNOWN

Unknown language code

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:172
OS_IOS
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:179
OS_ANDROID
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:184
OS_WINDOWS
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:189
OS_MARMALADE
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:194
OS_LINUX
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:199
OS_BADA
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:204
OS_BLACKBERRY
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:209
OS_OSX
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:214
OS_WP8
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:219
OS_WINRT
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:224
OS_UNKNOWN
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:229
UNKNOWN
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:235
WIN32
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:241
LINUX
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:247
MACOS
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:253
ANDROID
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:259
IPHONE
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:265
IPAD
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:271
BLACKBERRY
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:277
NACL
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:283
EMSCRIPTEN
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:289
TIZEN
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:295
WINRT
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:301
WP8
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:307
MOBILE_BROWSER
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:313
DESKTOP_BROWSER
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:319
EDITOR_PAGE

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

meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:326
EDITOR_CORE

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

meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:333
WECHAT_GAME
meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:340
BROWSER_TYPE_WECHAT

BROWSER_TYPE_WECHAT

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:347
BROWSER_TYPE_WECHAT_GAME

BROWSER_TYPE_WECHAT_GAME

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:354
BROWSER_TYPE_ANDROID
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:361
BROWSER_TYPE_IE
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:368
BROWSER_TYPE_QQ
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:375
BROWSER_TYPE_MOBILE_QQ
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:382
BROWSER_TYPE_UC
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:389
BROWSER_TYPE_360
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:396
BROWSER_TYPE_BAIDU_APP
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:403
BROWSER_TYPE_BAIDU
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:410
BROWSER_TYPE_MAXTHON
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:417
BROWSER_TYPE_OPERA
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:424
BROWSER_TYPE_OUPENG
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:431
BROWSER_TYPE_MIUI
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:438
BROWSER_TYPE_FIREFOX
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:445
BROWSER_TYPE_SAFARI
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:452
BROWSER_TYPE_CHROME
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:459
BROWSER_TYPE_LIEBAO
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:466
BROWSER_TYPE_QZONE
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:473
BROWSER_TYPE_SOUGOU
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:480
BROWSER_TYPE_UNKNOWN
meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:487
isNative

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

meta description
Type Boolean
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:496
isBrowser

Is web browser ?

meta description
Type Boolean
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:502
isMobile

Indicate whether system is mobile system

meta description
Type Boolean
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:592
platform

Indicate the running platform

meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:598
language

Indicate the current language of the running system

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:609
os

Indicate the running os name

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:643
osVersion

Indicate the running os version

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:648
osMainVersion

Indicate the running os main version

meta description
Type Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:653
browserType

Indicate the running browser type

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:659
browserVersion

Indicate the running browser version

meta description
Type String
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:691
windowPixelResolution

Indicate the real pixel resolution of the whole game window

meta description
Type Size
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:709
localStorage

cc.sys.localStorage is a local storage component.

meta description
Type Object
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:757
capabilities

The capabilities of the current platform

meta description
Type Object
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:825

Methods

garbageCollect

Forces the garbage collection, only available in JSB

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:932
dumpRoot

Dumps rooted objects, only available in JSB

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:940
restartVM

Restart the JS VM, only available in JSB

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:948
cleanScript

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

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:956
Parameters
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
Returns Boolean
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:965
Parameters
dump

Dump system informations

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:978
openURL

Open a url in browser

meta description
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:997
Parameters
now

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

meta description
Returns Number
Defined in https:/github.com/cocos-creator/engine/blob/master/cocos2d/core/platform/CCSys.js:1006

results matching ""

    No results matching ""