2019-02-22 19:33:06 +08:00

34 lines
632 B
JavaScript

cc.Class({
extends: cc.Component,
properties: {
scrollContent: {
default: null,
type: cc.Node
},
scrollView: {
default: null,
type: cc.ScrollView
},
mainScrollPrefab: {
default: null,
type: cc.Prefab
},
},
// LIFE-CYCLE CALLBACKS:
onLoad () {
var mainScroll = cc.instantiate(this.mainScrollPrefab);
this.scrollContent.addChild(mainScroll);
this.scrollView.node.on('scroll-ended', function (e) {
})
},
start () {
},
// update (dt) {},
});