Commit 602d0530 authored by haiyoucuv's avatar haiyoucuv

整理一下代码

parent 67253ec3
This diff is collapsed.
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "96036c76-35ff-47f4-bd17-5dd3591dc75a",
"files": [],
"subMetas": {},
"userData": {}
}
[
{
"__type__": "cc.AnimationClip",
"_name": "闹钟晃动",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 60,
"speed": 2,
"wrapMode": 2,
"enableTrsBlending": false,
"_duration": 0.5,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 11
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.VectorTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channels": [
{
"__id__": 3
},
{
"__id__": 5
},
{
"__id__": 7
},
{
"__id__": 9
}
],
"_nComponents": 3
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
"eulerAngles"
]
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 4
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 6
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 8
}
},
{
"__type__": "cc.RealCurve",
"_times": [
0,
0.1666666716337204,
0.3333333432674408,
0.5
],
"_values": [
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 10,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": -10,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
},
{
"__type__": "cc.RealKeyframeValue",
"interpolationMode": 0,
"tangentWeightMode": 0,
"value": 0,
"rightTangent": 0,
"rightTangentWeight": 1,
"leftTangent": 0,
"leftTangentWeight": 1,
"easingMethod": 0,
"__editorExtras__": null
}
],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 10
}
},
{
"__type__": "cc.RealCurve",
"_times": [],
"_values": [],
"preExtrapolation": 1,
"postExtrapolation": 1
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]
\ No newline at end of file
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "9371de4f-fc6b-4714-bf24-721c0c146333",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "闹钟晃动"
}
}
......@@ -29,7 +29,7 @@ export default class ToolBuyConfirmPanel extends Panel {
async start() {
const {buyRichSpCredits} = store.homeInfo;
this.tip.string = `确认使用${buyRichSpCredits}游园币购买\n天降财神道具*1 吗`;
this.tip.string = `确认使用${buyRichSpCredits}积分购买\n天降财神道具*1 吗`;
this.okBtn.on(Button.EventType.CLICK, this.buyHandle, this);
this.cancelBtn.on(Button.EventType.CLICK, this.hidePanel, this);
......
......@@ -26,8 +26,8 @@ export default class ToolBuyPanel extends Panel {
async start() {
const {buyRichSpCredits} = store.homeInfo;
// this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpCredits}</b></size></color><color=#C62F3A>游园币购买道具~</color>`;
this.tip.string = `您可消耗${buyRichSpCredits}游园币购买道具~`;
// this.view["RichText"].getComponent(RichText).string = `<color=#C62F3A>您可消耗</color><color=#fe0114><size=34><b>${buyRichSpCredits}</b></size></color><color=#C62F3A>积分购买道具~</color>`;
this.tip.string = `您可消耗${buyRichSpCredits}积分购买道具~`;
this.close.on(Button.EventType.CLICK, this.hidePanel, this);
this.buyBtn.on(Button.EventType.CLICK, this.buyHandle, this);
......
......@@ -17,6 +17,7 @@ import {
UIOpacity,
UITransform,
v3,
Animation,
Vec3,
} from "cc";
import Scene from "db://assets/Module/Scene";
......@@ -93,6 +94,8 @@ export class MainGame extends Scene {
@property({displayName: "向上滑动", group: "UI", type: Node})
operationTip: Node = null!;
@property({displayName: "闹钟图标", group: "UI", type: Node}) clockIcon: Node = null!;
loopArr: Prefab[] = [];
handArr: Prefab[] = [];
......@@ -120,11 +123,14 @@ export class MainGame extends Scene {
set score(v) {
this._score = v >> 0;
this.scoreTween = tween({score: +this.scoreLabel.string})
.to(0.66, {score: this.score}, {progress: this.updateScore})
this.scoreTween = tween(this)
// @ts-ignore
.to(0.66, {_tempScore: this.score}, {progress: this.updateScore})
.start();
}
_tempScore = 0;
updateScore = (start: number, end: number, current: number, ratio: number) => {
let newScore = Math.floor(start + (end - start) * ratio);
this.scoreLabel.string = newScore.toString();
......@@ -309,9 +315,15 @@ export class MainGame extends Scene {
this.schedule(this.cdDown, 1);
}
clockAnim = false;
cdDown() {
if (this.cdPause) return;
this.cd--;
if (!this.clockAnim && this.cd <= 10) {
this.clockAnim = true;
this.clockIcon.getComponent(Animation).play();
}
if (this.cd <= 0) {
this.unschedule(this.cdDown);
this.gameOver();
......@@ -387,6 +399,7 @@ export class MainGame extends Scene {
this.richManNum--;
this.isUseGod = true;
this.uiLayer.view["天降财神"].active = false;
// this.scheduleOnce(() => {
// this.isUseGod = false;
// }, 5)
......
......@@ -297,10 +297,10 @@ export const _asyncThrottle = (fun, delay = 2000) => {
if (!canClick) return;
if (last && now < last + delay) {
clearTimeout(deferTimer);
deferTimer = setTimeout(() => {
last = now;
}, delay);
// clearTimeout(deferTimer);
// deferTimer = setTimeout(() => {
// last = now;
// }, delay);
} else {
last = now;
const ps = fun.apply(this, arguments);
......
......@@ -34,7 +34,7 @@ export class Start extends Component {
progressBar: ProgressBar;
onLoad() {
game.frameRate = _FPS;
// game.frameRate = _FPS;
// 预览调试时,显示性能统计面板
if (PREVIEW) {
......
......@@ -317,7 +317,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 324.9091796875,
"width": 290.9091796875,
"height": 117.51999999999998
},
"_anchorPoint": {
......@@ -353,7 +353,7 @@
"b": 58,
"a": 255
},
"_string": "确认使用0游园币购买\n天降财神道具*1 吗",
"_string": "确认使用0积分购买\n天降财神道具*1 吗",
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 34,
......
......@@ -39,7 +39,7 @@
<script src="//yun.duiba.com.cn/polaris/SVGA.Lite.v2.1.1.d3a67cbc13c591c53c6f87ab34c57ce387010374.js" crossorigin="anonymous"></script>
<script src="//yun.duiba.com.cn/aurora/assets/2403d1edf2acd15b179306b6ddaa5f0967d78a8f.js"></script>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718878634505/style.css"/>
<link rel="stylesheet" type="text/css" href="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718938753520/style.css"/>
<style>
.sui-captcha {
......@@ -94,17 +94,17 @@
</div>
<!-- Polyfills bundle. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718878634505/src/polyfills.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718938753520/src/polyfills.bundle.js" charset="utf-8"></script>
<!-- SystemJS support. -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718878634505/src/system.bundle.js" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718938753520/src/system.bundle.js" charset="utf-8"></script>
<!-- Import map -->
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718878634505/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script src="//yun.duiba.com.cn/db_games/ccc_game/template3d/1718938753520/src/import-map.json" type="systemjs-importmap" charset="utf-8"></script>
<script>
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1718878634505/index.js').catch(function (err) {
System.import('//yun.duiba.com.cn/db_games/ccc_game/template3d/1718938753520/index.js').catch(function (err) {
console.error(err);
})
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment