Files
beimi/client/version/chess/assets/resources/script/components/IOUtils.js
2017-12-21 23:04:13 +08:00

34 lines
1.0 KiB
JavaScript

cc.Class({
extends: cc.Component,
properties: {
// foo: {
// default: null, // The default value will be used only when the component attaching
// to a node for the first time
// url: cc.Texture2D, // optional, default is typeof default
// serializable: true, // optional, default is true
// visible: true, // optional, default is true
// displayName: 'Foo', // optional
// readonly: false, // optional, default is false
// },
// ...
},
// use this for initialization
statics:{
get:function(key){
return cc.sys.localStorage.getItem(key) ;
},
put:function(key , value){
cc.sys.localStorage.setItem(key, value) ;
},
remove:function(key){
cc.sys.localStorage.removeItem(key) ;
}
}
// called every frame, uncomment this function to activate update callback
// update: function (dt) {
// },
});