093f4e84-92fd-43e0-a556-0abc9863dfc7.js
4.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
"use strict";
cc._RF.push(module, '093f46Ekv1D4KVWCryYY9/H', 'DateCountViewImpl');
// script/game/ui/view/impl/DateCountViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DateCountViewImpl = void 0;
const DateCountView_1 = require("../type/DateCountView");
const CCViewBase_1 = require("../../../../common/classbase/CCViewBase");
const PresenterCCViewFactory_1 = require("../../PresenterCCViewFactory");
const CCDummyObjects_1 = require("../../../../common/CCDummyObjects");
const simba_cc_resutils_1 = require("simba-cc-resutils");
const { ccclass, property } = cc._decorator;
let DateCountViewImpl = /** @class */ (() => {
let DateCountViewImpl = class DateCountViewImpl extends CCViewBase_1.CCPureView {
constructor() {
super(...arguments);
this.progressTipSpr = CCDummyObjects_1.DummySprite;
this.preNumberSpr = CCDummyObjects_1.DummySprite;
this.curNumberSpr = CCDummyObjects_1.DummySprite;
this.skinSpr = CCDummyObjects_1.DummySprite;
this.numberNode = CCDummyObjects_1.DummyNode;
this.skinNameLabel = CCDummyObjects_1.DummyRichText;
this.kaNode = CCDummyObjects_1.DummyNode;
this._resumPosY = -120;
this._moveTmpPosY = -10;
this._actLifeCycle = 2;
this._rotationStep = -60;
this.runMoveAction = () => {
this.numberNode.y = this._resumPosY;
cc.tween(this.numberNode).to(this._actLifeCycle, { y: this._moveTmpPosY }, { easing: 'backInOut' }).start();
};
this.resumeMoveAction = () => {
this.numberNode.y = this._resumPosY;
};
}
onLoad() {
this.bindProp("skinSprPath", async (value) => {
if (value && "" !== value.trim() && !value.endsWith("/")) {
this.skinSpr.spriteFrame = await simba_cc_resutils_1.ResUtils.loadRes(value, cc.SpriteFrame);
}
});
this.bindProp("progressTipSprPath", async (value) => {
if (value && "" !== value.trim() && !value.endsWith("/")) {
this.progressTipSpr.spriteFrame = await simba_cc_resutils_1.ResUtils.loadRes(value, cc.SpriteFrame);
}
});
this.bindProp("preNumberSprPath", async (value) => {
if (value && "" !== value.trim() && !value.endsWith("/")) {
this.preNumberSpr.spriteFrame = await simba_cc_resutils_1.ResUtils.loadRes(value, cc.SpriteFrame);
}
});
this.bindProp("curNumberSprPath", async (value) => {
if (value && "" !== value.trim() && !value.endsWith("/")) {
this.curNumberSpr.spriteFrame = await simba_cc_resutils_1.ResUtils.loadRes(value, cc.SpriteFrame);
}
});
this.bindProp("skinName", async (value) => {
this.skinNameLabel.string = value;
});
}
onEnable() {
this.kaNodeAnim();
}
kaNodeAnim() {
cc.tween(this.kaNode).by(this._actLifeCycle, { angle: this._rotationStep }).repeatForever().start();
}
closeAction() {
if (this._props.canClose) {
this.close();
// GameModelManager.checkAutoPopView();
}
}
};
__decorate([
property(cc.Sprite)
], DateCountViewImpl.prototype, "progressTipSpr", void 0);
__decorate([
property(cc.Sprite)
], DateCountViewImpl.prototype, "preNumberSpr", void 0);
__decorate([
property(cc.Sprite)
], DateCountViewImpl.prototype, "curNumberSpr", void 0);
__decorate([
property(cc.Sprite)
], DateCountViewImpl.prototype, "skinSpr", void 0);
__decorate([
property(cc.Node)
], DateCountViewImpl.prototype, "numberNode", void 0);
__decorate([
property(cc.RichText)
], DateCountViewImpl.prototype, "skinNameLabel", void 0);
__decorate([
property(cc.Node)
], DateCountViewImpl.prototype, "kaNode", void 0);
DateCountViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(DateCountView_1.DateCountViewType, "prefab/ui/DateCountView")
], DateCountViewImpl);
return DateCountViewImpl;
})();
exports.DateCountViewImpl = DateCountViewImpl;
cc._RF.pop();