Commit ca333642 authored by haiyoucuv's avatar haiyoucuv

init

parent 73142c1e
This diff is collapsed.
[
{
"__type__": "cc.AnimationClip",
"_name": "pre倒计时",
"_objFlags": 0,
"__editorExtras__": {
"embeddedPlayerGroups": []
},
"_native": "",
"sample": 11,
"speed": 1,
"wrapMode": 1,
"enableTrsBlending": false,
"_duration": 2.8181818181818183,
"_hash": 500763545,
"_tracks": [
{
"__id__": 1
}
],
"_exoticAnimation": null,
"_events": [],
"_embeddedPlayers": [],
"_additiveSettings": {
"__id__": 7
},
"_auxiliaryCurveEntries": []
},
{
"__type__": "cc.animation.ObjectTrack",
"_binding": {
"__type__": "cc.animation.TrackBinding",
"path": {
"__id__": 2
},
"proxy": null
},
"_channel": {
"__id__": 5
}
},
{
"__type__": "cc.animation.TrackPath",
"_paths": [
{
"__id__": 3
},
{
"__id__": 4
},
"spriteFrame"
]
},
{
"__type__": "cc.animation.HierarchyPath",
"path": "num"
},
{
"__type__": "cc.animation.ComponentPath",
"component": "cc.Sprite"
},
{
"__type__": "cc.animation.Channel",
"_curve": {
"__id__": 6
}
},
{
"__type__": "cc.ObjectCurve",
"_times": [
0,
0.9090909090909091,
1.8181818181818181,
2.727272727272727
],
"_values": [
{
"__uuid__": "5870fa57-9c45-4f17-863f-69de905a1c30@f9941",
"__expectedType__": "cc.SpriteFrame"
},
{
"__uuid__": "1363a8d5-0023-496b-8f5c-ab5bd4c34675@f9941",
"__expectedType__": "cc.SpriteFrame"
},
{
"__uuid__": "642b41d3-6e71-49ff-a112-51db6c98369d@f9941",
"__expectedType__": "cc.SpriteFrame"
},
{
"__uuid__": "642b41d3-6e71-49ff-a112-51db6c98369d@f9941",
"__expectedType__": "cc.SpriteFrame"
}
]
},
{
"__type__": "cc.AnimationClipAdditiveSettings",
"enabled": false,
"refClip": null
}
]
\ No newline at end of file
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "4a6cfa3d-4334-4a1c-a05c-09a95115a0c5",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "pre倒计时"
}
}
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "62ba7b1c-d57c-4c6b-ada9-45983ac699f6",
"files": [],
"subMetas": {},
"userData": {}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "642b41d3-6e71-49ff-a112-51db6c98369d",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "642b41d3-6e71-49ff-a112-51db6c98369d@6c48a",
"displayName": "1",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "642b41d3-6e71-49ff-a112-51db6c98369d",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "642b41d3-6e71-49ff-a112-51db6c98369d@f9941",
"displayName": "1",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 56,
"height": 178,
"rawWidth": 56,
"rawHeight": 178,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-28,
-89,
0,
28,
-89,
0,
-28,
89,
0,
28,
89,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
178,
56,
178,
0,
0,
56,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-28,
-89,
0
],
"maxPos": [
28,
89,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "642b41d3-6e71-49ff-a112-51db6c98369d@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "642b41d3-6e71-49ff-a112-51db6c98369d@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "1363a8d5-0023-496b-8f5c-ab5bd4c34675",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "1363a8d5-0023-496b-8f5c-ab5bd4c34675@6c48a",
"displayName": "2",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "1363a8d5-0023-496b-8f5c-ab5bd4c34675",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "1363a8d5-0023-496b-8f5c-ab5bd4c34675@f9941",
"displayName": "2",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 121,
"height": 181,
"rawWidth": 121,
"rawHeight": 181,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-60.5,
-90.5,
0,
60.5,
-90.5,
0,
-60.5,
90.5,
0,
60.5,
90.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
181,
121,
181,
0,
0,
121,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-60.5,
-90.5,
0
],
"maxPos": [
60.5,
90.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "1363a8d5-0023-496b-8f5c-ab5bd4c34675@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "1363a8d5-0023-496b-8f5c-ab5bd4c34675@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "5870fa57-9c45-4f17-863f-69de905a1c30",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "5870fa57-9c45-4f17-863f-69de905a1c30@6c48a",
"displayName": "3",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "5870fa57-9c45-4f17-863f-69de905a1c30",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "5870fa57-9c45-4f17-863f-69de905a1c30@f9941",
"displayName": "3",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 125,
"height": 184,
"rawWidth": 125,
"rawHeight": 184,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-62.5,
-92,
0,
62.5,
-92,
0,
-62.5,
92,
0,
62.5,
92,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
184,
125,
184,
0,
0,
125,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-62.5,
-92,
0
],
"maxPos": [
62.5,
92,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "5870fa57-9c45-4f17-863f-69de905a1c30@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "5870fa57-9c45-4f17-863f-69de905a1c30@6c48a"
}
}
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8@6c48a",
"displayName": "倒计时",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8",
"isUuid": true,
"visible": false,
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"anisotropy": 0
},
"ver": "1.0.22",
"imported": true,
"files": [
".json"
],
"subMetas": {}
},
"f9941": {
"importer": "sprite-frame",
"uuid": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8@f9941",
"displayName": "倒计时",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 185,
"height": 56,
"rawWidth": 185,
"rawHeight": 56,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-92.5,
-28,
0,
92.5,
-28,
0,
-92.5,
28,
0,
92.5,
28,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
56,
185,
56,
0,
0,
185,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-92.5,
-28,
0
],
"maxPos": [
92.5,
28,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "1dd4a0a2-32f7-4609-ac6b-33b493c6b1f8@6c48a"
}
}
import { _decorator, Animation, Component, Node } from "cc";
const { ccclass, property } = _decorator;
@ccclass("PreCd")
export class PreCd extends Component {
private static _ins: PreCd;
static get ins() {
return this._ins;
}
animation: Animation = null;
protected onLoad() {
PreCd._ins = this;
this.node.active = false;
this.animation = this.getComponent(Animation);
}
protected onDestroy() {
PreCd._ins = null;
}
async startCd() {
this.node.active = true;
return new Promise<void>((resolve) => {
this.animation.play();
const callBack = () => {
this.animation.off(Animation.EventType.FINISHED, callBack);
this.node.active = false;
console.log(12312);
resolve();
};
this.animation.once(Animation.EventType.FINISHED, callBack);
});
}
}
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "ab733171-f753-4deb-805e-d12c58ce388b",
"files": [],
"subMetas": {},
"userData": {}
}
......@@ -23,6 +23,7 @@ import { aiPool, clearAllPool } from "./Manager/CommonPool";
import { useNick } from "./Common/AINick";
import { observer, render } from "../../store/decorators";
import gameStore from "../../store/gameStore";
import { PreCd } from "./Components/PreCd";
const { ccclass, property } = _decorator;
......@@ -90,7 +91,7 @@ export class MainGame extends Scene {
director.on(Events.setGameState, this.setGameState, this);
}
start() {
async start() {
this.player.init({
// initEnergy: 10000
nickName: "我",
......@@ -103,6 +104,8 @@ export class MainGame extends Scene {
this.initAnimal(this.maxAnimal);
// this.initAnimal(1);
await PreCd.ins.startCd();
// 设置游戏状态
this.setGameState(GameState.PLAY);
}
......@@ -119,7 +122,6 @@ export class MainGame extends Scene {
this.lengthTxt.string = `${length}`;
this.killTxt.string = `${killNum}名`;
this.luckyNum.string = ${luckNum + gameStore.startInfo?.accumulateLuckNum || 0}`;
}
update(dt: number) {
......
......@@ -11,8 +11,6 @@ export class SpeedPropBtn extends PropBtn {
doUse() {
super.doUse();
this.startCd(15);
}
......
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