pubgv3/assets/scripts/forsub/showcoin.js
zhuguoqing ff550d5d6a init
2022-05-22 10:32:02 +08:00

40 lines
798 B
JavaScript

var SDKManage = require("SDKManage")
var Main = require("Main")
var playerData = require("playerData")
cc.Class({
extends: cc.Component,
properties: {
temp1:0,
temp2:0,
temp3:0,
},
// LIFE-CYCLE CALLBACKS:
// onLoad () {},
onLoad () {
var temp = []
if (this.temp1 != 0) {
temp.push(this.temp1)
}
if (this.temp2 != 0) {
temp.push(this.temp2)
}
if (this.temp3 != 0) {
temp.push(this.temp3)
}
playerData.coinArr.push(temp)
cc.Notifier.emit('showCoin')
},
onDestroy(){
playerData.coinArr.pop()
cc.Notifier.emit('showCoin')
},
// update (dt) {
// },
});