12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- const DWTool = require("../utils/DWTool")
- cc.Class({
- extends: cc.Component,
- properties: {
- itemSprite: [cc.SpriteFrame],
- infoText: cc.RichText,
- statusText: cc.RichText
- },
-
-
-
-
-
-
-
-
-
-
-
-
-
- init (type = 0, msg = "", createTime) {
- this.node.getComponent(cc.Sprite).spriteFrame = this.itemSprite[type]
- let time = DWTool.timeParse(createTime / 1000)
- this.infoText.string = msg
- this.statusText.string = time
- },
- onLoad () {
- },
- start () {
- }
- });
|