cc.Class({
    extends: cc.Component,

    properties: {
        Pic: cc.Node,
    },
    // 存储数据:cc.sys.localStorage.setItem(“key”,”value”)

    // 获取数据:cc.sys.localStorage.getItem(“key”)
 
    // 移除数据:cc.sys.localStorage.removeItem(“key”)
 
    // 清除所有:cc.sys.localStorage.clear()
    // use this for initialization
    onLoad: function () {
        this.Move();
        Audio.playmusic('resources/audio/sound_main_bg.mp3');
    },

    // called every frame
    update: function (dt) {

    },
    Move:function(){
        var action1 = cc.moveBy(0.5, 0, 10);
        var action2 = cc.moveBy(0.5, 0, -10);
        var seq = cc.sequence(action1,action2);
        var rep = cc.repeatForever(seq);
        this.Pic.runAction(rep);
    }
});
