Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MingSnake_241120
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
MingSnake_241120
Commits
ca333642
Commit
ca333642
authored
Nov 27, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
73142c1e
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
1421 additions
and
132 deletions
+1421
-132
MainGame.scene
assets/Bundles/MainGame/MainGame.scene
+708
-128
pre倒计时.anim
assets/Bundles/MainGame/anim/pre倒计时.anim
+101
-0
pre倒计时.anim.meta
assets/Bundles/MainGame/anim/pre倒计时.anim.meta
+13
-0
倒计时.meta
assets/Bundles/MainGame/png/倒计时.meta
+9
-0
1.png
assets/Bundles/MainGame/png/倒计时/1.png
+0
-0
1.png.meta
assets/Bundles/MainGame/png/倒计时/1.png.meta
+134
-0
2.png
assets/Bundles/MainGame/png/倒计时/2.png
+0
-0
2.png.meta
assets/Bundles/MainGame/png/倒计时/2.png.meta
+134
-0
3.png
assets/Bundles/MainGame/png/倒计时/3.png
+0
-0
3.png.meta
assets/Bundles/MainGame/png/倒计时/3.png.meta
+134
-0
倒计时.png
assets/Bundles/MainGame/png/倒计时/倒计时.png
+0
-0
倒计时.png.meta
assets/Bundles/MainGame/png/倒计时/倒计时.png.meta
+134
-0
PreCd.ts
assets/Scripts/Scenes/MainGame/Components/PreCd.ts
+41
-0
PreCd.ts.meta
assets/Scripts/Scenes/MainGame/Components/PreCd.ts.meta
+9
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+4
-2
SpeedPropBtn.ts
assets/Scripts/Scenes/MainGame/PropBtn/SpeedPropBtn.ts
+0
-2
No files found.
assets/Bundles/MainGame/MainGame.scene
View file @
ca333642
This diff is collapsed.
Click to expand it.
assets/Bundles/MainGame/anim/pre倒计时.anim
0 → 100644
View file @
ca333642
[
{
"__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
assets/Bundles/MainGame/anim/pre倒计时.anim.meta
0 → 100644
View file @
ca333642
{
"ver": "2.0.3",
"importer": "animation-clip",
"imported": true,
"uuid": "4a6cfa3d-4334-4a1c-a05c-09a95115a0c5",
"files": [
".cconb"
],
"subMetas": {},
"userData": {
"name": "pre倒计时"
}
}
assets/Bundles/MainGame/png/倒计时.meta
0 → 100644
View file @
ca333642
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "62ba7b1c-d57c-4c6b-ada9-45983ac699f6",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Bundles/MainGame/png/倒计时/1.png
0 → 100644
View file @
ca333642
880 Bytes
assets/Bundles/MainGame/png/倒计时/1.png.meta
0 → 100644
View file @
ca333642
{
"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"
}
}
assets/Bundles/MainGame/png/倒计时/2.png
0 → 100644
View file @
ca333642
3.4 KB
assets/Bundles/MainGame/png/倒计时/2.png.meta
0 → 100644
View file @
ca333642
{
"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"
}
}
assets/Bundles/MainGame/png/倒计时/3.png
0 → 100644
View file @
ca333642
4.04 KB
assets/Bundles/MainGame/png/倒计时/3.png.meta
0 → 100644
View file @
ca333642
{
"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"
}
}
assets/Bundles/MainGame/png/倒计时/倒计时.png
0 → 100644
View file @
ca333642
1.92 KB
assets/Bundles/MainGame/png/倒计时/倒计时.png.meta
0 → 100644
View file @
ca333642
{
"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"
}
}
assets/Scripts/Scenes/MainGame/Components/PreCd.ts
0 → 100644
View file @
ca333642
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
);
});
}
}
assets/Scripts/Scenes/MainGame/Components/PreCd.ts.meta
0 → 100644
View file @
ca333642
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "ab733171-f753-4deb-805e-d12c58ce388b",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
ca333642
...
...
@@ -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) {
...
...
assets/Scripts/Scenes/MainGame/PropBtn/SpeedPropBtn.ts
View file @
ca333642
...
...
@@ -11,8 +11,6 @@ export class SpeedPropBtn extends PropBtn {
doUse
()
{
super
.
doUse
();
this
.
startCd
(
15
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment