Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
TNGD_CaveCruiser
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
TNGD_CaveCruiser
Commits
809f519d
Commit
809f519d
authored
Oct 09, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
2b02b347
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1580 additions
and
496 deletions
+1580
-496
GuideGame.scene
assets/Bundles/MainGame/GuideGame.scene
+1399
-448
Guide1.png
assets/Bundles/MainGame/png/Guide1.png
+0
-0
Guide2.png
assets/Bundles/MainGame/png/Guide2.png
+0
-0
start.png
assets/Bundles/MainGame/png/start.png
+0
-0
start.png.meta
assets/Bundles/MainGame/png/start.png.meta
+134
-0
svga.meta
assets/Bundles/MainGame/svga.meta
+9
-0
1输出手势.svga
assets/Bundles/MainGame/svga/1输出手势.svga
+0
-0
1输出手势.svga.meta
assets/Bundles/MainGame/svga/1输出手势.svga.meta
+12
-0
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+2
-3
GuideGame.ts
assets/Scripts/Scenes/MainGame/GuideGame.ts
+14
-44
GuideNode.ts
assets/Scripts/Scenes/MainGame/GuideNode.ts
+4
-1
Wall.ts
assets/Scripts/Scenes/MainGame/Wall.ts
+6
-0
No files found.
assets/Bundles/MainGame/GuideGame.scene
View file @
809f519d
This diff is collapsed.
Click to expand it.
assets/Bundles/MainGame/png/Guide1.png
View replaced file @
2b02b347
View file @
809f519d
7.8 KB
|
W:
|
H:
5.89 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/Bundles/MainGame/png/Guide2.png
View replaced file @
2b02b347
View file @
809f519d
8.73 KB
|
W:
|
H:
5.07 KB
|
W:
|
H:
2-up
Swipe
Onion skin
assets/Bundles/MainGame/png/start.png
0 → 100644
View file @
809f519d
2.88 KB
assets/Bundles/MainGame/png/start.png.meta
0 → 100644
View file @
809f519d
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "fe3910ac-97d8-481c-9627-601077b214ec",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a",
"displayName": "start",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "fe3910ac-97d8-481c-9627-601077b214ec",
"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": "fe3910ac-97d8-481c-9627-601077b214ec@f9941",
"displayName": "start",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 297,
"height": 58,
"rawWidth": 297,
"rawHeight": 58,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-148.5,
-29,
0,
148.5,
-29,
0,
-148.5,
29,
0,
148.5,
29,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
58,
297,
58,
0,
0,
297,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-148.5,
-29,
0
],
"maxPos": [
148.5,
29,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "fe3910ac-97d8-481c-9627-601077b214ec@6c48a"
}
}
assets/Bundles/MainGame/svga.meta
0 → 100644
View file @
809f519d
{
"ver": "1.2.0",
"importer": "directory",
"imported": true,
"uuid": "9e1763c8-e82d-4301-801a-d738b026a7af",
"files": [],
"subMetas": {},
"userData": {}
}
assets/Bundles/MainGame/svga/1输出手势.svga
0 → 100644
View file @
809f519d
File added
assets/Bundles/MainGame/svga/1输出手势.svga.meta
0 → 100644
View file @
809f519d
{
"ver": "1.0.0",
"importer": "*",
"imported": true,
"uuid": "46343c99-7acb-4df4-9c35-3d9cab5e102e",
"files": [
".json",
".svga"
],
"subMetas": {},
"userData": {}
}
assets/Scripts/Scenes/HomeScene.ts
View file @
809f519d
import
{
_decorator
,
Button
,
Label
,
Node
,
screen
,
UI
,
UITransform
,
Widget
}
from
'cc'
;
import
{
_decorator
,
Button
,
game
,
Label
,
Node
,
screen
,
UI
,
UITransform
,
Widget
}
from
'cc'
;
import
Scene
from
"db://assets/Module/Scene"
;
import
{
MainGame
}
from
"./MainGame/MainGame"
;
import
{
changeScene
,
showPanel
}
from
"db://assets/Module/UIFast"
;
import
store
from
"../store/store"
;
import
{
observer
,
render
}
from
"../store/decorators"
;
import
{
_asyncThrottle
}
from
"../Utils/Utils"
;
import
{
GuideScene
}
from
"./GuideScene"
;
import
GameMgr
from
"../GameMgr"
;
import
RankPanel
from
"../Panels/RankPanel"
;
import
{
UIMgr
}
from
"../../Module/UIMgr"
;
...
...
@@ -67,7 +66,7 @@ export class HomeScene extends Scene {
clickRule
=
_asyncThrottle
(
async
()
=>
{
// showPanel(RulePanel);
changeScene
(
GuideGame
);
changeScene
(
GuideGame
,
{
from
:
"HomeScene"
}
);
});
clickRank
=
_asyncThrottle
(()
=>
{
...
...
assets/Scripts/Scenes/MainGame/GuideGame.ts
View file @
809f519d
...
...
@@ -150,11 +150,14 @@ export class GuideGame extends Scene {
isOver
:
boolean
=
false
;
async
gameOver
()
{
if
(
this
.
isOver
)
return
;
this
.
isOver
=
true
;
await
sleep
(
1.5
);
this
.
phyUpdate
=
false
;
this
.
guideNode
.
show
(
4
);
await
GameMgr
.
ins
.
submit
(
this
.
score
);
//
await GameMgr.ins.submit(this.score);
}
...
...
@@ -178,6 +181,11 @@ export class GuideGame extends Scene {
this
.
guideNode
.
guide3Next
.
once
(
Button
.
EventType
.
CLICK
,
()
=>
{
this
.
phyUpdate
=
true
;
this
.
guideNode
.
hide
();
// this.scheduleOnce(() => {
// this.gameOver();
// }, 10);
resolve
();
});
});
...
...
@@ -253,11 +261,8 @@ export class GuideGame extends Scene {
const
singular
=
z
%
2
==
0
;
const
newGroup
=
instantiate
(
singular
?
this
.
wallPrefab
:
this
.
wallPrefab2
);
this
.
node
.
addChild
(
newGroup
);
newGroup
.
setPosition
(
v3
(
0
,
0
,
z
));
newGroup
.
getComponent
(
Wall
).
resetGuide
();
// newGroup.setPosition(v3(0, Math.random(), z));
return
newGroup
;
}
...
...
@@ -331,20 +336,6 @@ export class GuideGame extends Scene {
}
checkFrame
=
0
;
propCFG
=
[
{
lastZ
:
0
,
create
:
false
,
interval
:
1111111
,
funcName
:
"createLight"
,
},
{
lastZ
:
0
,
create
:
false
,
interval
:
1111111
,
funcName
:
"createRing"
,
},
]
checkWall
()
{
this
.
checkFrame
=
0
;
...
...
@@ -352,36 +343,16 @@ export class GuideGame extends Scene {
const
pz
=
Math
.
round
(
pPos
.
z
);
const
index
=
this
.
wallArr
[
0
].
position
.
z
-
pz
;
const
propLen
=
this
.
propCFG
.
length
;
let
create
=
false
;
for
(
let
i
=
0
;
i
<
propLen
;
i
++
)
{
const
{
lastZ
,
interval
}
=
this
.
propCFG
[
i
];
const
dz
=
lastZ
-
pz
;
if
(
create
)
{
this
.
propCFG
[
i
].
lastZ
=
pz
;
}
else
if
(
dz
>=
interval
)
{
create
=
true
;
this
.
propCFG
[
i
].
create
=
true
;
this
.
propCFG
[
i
].
lastZ
=
pz
;
}
}
const
createCount
=
index
-
4
;
for
(
let
i
=
0
;
i
<
createCount
;
i
++
)
{
const
wall
=
this
.
wallArr
.
shift
();
wall
.
setPosition
(
0
,
Math
.
random
(),
this
.
wallArr
[
this
.
wallArr
.
length
-
1
].
position
.
z
-
1
);
this
.
wallArr
.
push
(
wall
);
const
wallTs
=
wall
.
getComponent
(
Wall
);
if
(
this
.
guideNode
.
guideIndex
==
3
)
{
wallTs
.
resetDeath
();
}
else
{
wallTs
.
resetGuide
();
for
(
let
i
=
0
;
i
<
propLen
;
i
++
)
{
const
{
funcName
,
create
}
=
this
.
propCFG
[
i
];
if
(
create
)
{
this
.
propCFG
[
i
].
create
=
false
;
wallTs
[
funcName
]();
break
;
}
}
}
}
...
...
@@ -390,7 +361,6 @@ export class GuideGame extends Scene {
this
.
score
+=
~~
((
addScore
*
15
)
*
this
.
scoreRadio
);
if
(
this
.
score
>
9999
)
{
this
.
score
=
9999
;
PhysicsSystem
.
instance
.
enable
=
false
;
this
.
gameOver
();
}
}
...
...
assets/Scripts/Scenes/MainGame/GuideNode.ts
View file @
809f519d
import
{
_decorator
,
Component
,
Node
}
from
'cc'
;
import
{
_decorator
,
Button
,
Component
,
Node
}
from
'cc'
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
@@ -14,6 +14,9 @@ export class GuideNode extends Component {
@
property
(
Node
)
guide3Next
:
Node
=
null
;
@
property
(
Node
)
guide4Next
:
Node
=
null
;
guideIndex
:
0
|
1
|
2
|
3
|
4
=
0
;
get
guideShow
()
{
...
...
assets/Scripts/Scenes/MainGame/Wall.ts
View file @
809f519d
...
...
@@ -41,6 +41,12 @@ export class Wall extends Component {
this
.
bottom
.
setPosition
(
0
,
-
this
.
dH
/
2
,
0
);
}
resetDeath
()
{
this
.
dH
=
Math
.
random
()
*
3
+
0.5
;
this
.
top
.
setPosition
(
0
,
this
.
dH
/
2
,
0
);
this
.
bottom
.
setPosition
(
0
,
-
this
.
dH
/
2
,
0
);
}
light
:
Node
=
null
;
createLight
()
{
...
...
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