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
de94fdcf
Commit
de94fdcf
authored
Sep 11, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
8b659169
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
440 additions
and
95 deletions
+440
-95
HomeScene.ts
assets/Scripts/Scenes/HomeScene.ts
+7
-0
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+8
-2
Start.ts
assets/Start/Start.ts
+0
-1
UICanvas.prefab
assets/Start/UICanvas.prefab
+1
-1
HomeScene.scene
assets/resources/HomeScene/HomeScene.scene
+290
-91
返回.png
assets/resources/HomeScene/png/返回.png
+0
-0
返回.png.meta
assets/resources/HomeScene/png/返回.png.meta
+134
-0
No files found.
assets/Scripts/Scenes/HomeScene.ts
View file @
de94fdcf
...
@@ -9,6 +9,7 @@ import { GuideScene } from "./GuideScene";
...
@@ -9,6 +9,7 @@ import { GuideScene } from "./GuideScene";
import
GameMgr
from
"../GameMgr"
;
import
GameMgr
from
"../GameMgr"
;
import
RankPanel
from
"../Panels/RankPanel"
;
import
RankPanel
from
"../Panels/RankPanel"
;
import
{
UIMgr
}
from
"../../Module/UIMgr"
;
import
{
UIMgr
}
from
"../../Module/UIMgr"
;
import
{
popWindow
}
from
"../AppTool"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -23,12 +24,14 @@ export class HomeScene extends Scene {
...
@@ -23,12 +24,14 @@ export class HomeScene extends Scene {
@
property
(
Node
)
startBtn
:
Node
=
null
;
@
property
(
Node
)
startBtn
:
Node
=
null
;
@
property
(
Node
)
ruleBtn
:
Node
=
null
;
@
property
(
Node
)
ruleBtn
:
Node
=
null
;
@
property
(
Node
)
rankBtn
:
Node
=
null
;
@
property
(
Node
)
rankBtn
:
Node
=
null
;
@
property
(
Node
)
backBtn
:
Node
=
null
;
onLoad
()
{
onLoad
()
{
this
.
startBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickStart
,
this
);
this
.
startBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickStart
,
this
);
this
.
ruleBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRule
,
this
);
this
.
ruleBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRule
,
this
);
this
.
rankBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRank
,
this
);
this
.
rankBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickRank
,
this
);
this
.
backBtn
.
on
(
Button
.
EventType
.
CLICK
,
this
.
clickBack
,
this
);
}
}
async
start
()
{
async
start
()
{
...
@@ -69,5 +72,9 @@ export class HomeScene extends Scene {
...
@@ -69,5 +72,9 @@ export class HomeScene extends Scene {
showPanel
(
RankPanel
);
showPanel
(
RankPanel
);
});
});
clickBack
=
_asyncThrottle
(()
=>
{
// popWindow();
});
}
}
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
de94fdcf
...
@@ -125,7 +125,7 @@ export class MainGame extends Scene {
...
@@ -125,7 +125,7 @@ export class MainGame extends Scene {
this
.
wallArr
[
i
]
=
this
.
createCube
();
this
.
wallArr
[
i
]
=
this
.
createCube
();
}
}
await
sleep
(
0.5
);
//
await sleep(0.5);
input
.
on
(
Input
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
input
.
on
(
Input
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
input
.
on
(
Input
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
);
input
.
on
(
Input
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
);
input
.
on
(
Input
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
input
.
on
(
Input
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
...
@@ -133,6 +133,11 @@ export class MainGame extends Scene {
...
@@ -133,6 +133,11 @@ export class MainGame extends Scene {
}
}
onDestroy
()
{
onDestroy
()
{
input
.
off
(
Input
.
EventType
.
TOUCH_START
,
this
.
onTouchStart
,
this
);
input
.
off
(
Input
.
EventType
.
TOUCH_MOVE
,
this
.
onTouchMove
,
this
);
input
.
off
(
Input
.
EventType
.
TOUCH_END
,
this
.
onTouchEnd
,
this
);
input
.
off
(
Input
.
EventType
.
TOUCH_CANCEL
,
this
.
onTouchEnd
,
this
);
this
.
linkPoint
.
destroy
();
this
.
linkPoint
.
destroy
();
// this.playerConstraint.connectedBody = null;
// this.playerConstraint.connectedBody = null;
// this.playerConstraint.enabled = false;
// this.playerConstraint.enabled = false;
...
@@ -288,6 +293,7 @@ export class MainGame extends Scene {
...
@@ -288,6 +293,7 @@ export class MainGame extends Scene {
onTouchEnd
(
event
:
any
)
{
onTouchEnd
(
event
:
any
)
{
if
(
this
.
isOver
)
return
;
if
(
this
.
isOver
)
return
;
if
(
!
this
.
isTouch
)
return
;
this
.
isTouch
=
false
;
this
.
isTouch
=
false
;
this
.
line
.
active
=
false
;
this
.
line
.
active
=
false
;
...
@@ -351,7 +357,7 @@ export class MainGame extends Scene {
...
@@ -351,7 +357,7 @@ export class MainGame extends Scene {
}
}
updateScore
()
{
updateScore
()
{
this
.
score
=
~~
(
this
.
maxZ
*
1
01
5
)
+
this
.
propScore
;
this
.
score
=
~~
(
this
.
maxZ
*
15
)
+
this
.
propScore
;
if
(
this
.
score
>
9999
){
if
(
this
.
score
>
9999
){
this
.
score
=
9999
;
this
.
score
=
9999
;
...
...
assets/Start/Start.ts
View file @
de94fdcf
...
@@ -6,7 +6,6 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
...
@@ -6,7 +6,6 @@ import { HomeScene } from "db://assets/Scripts/Scenes/HomeScene";
import
{
sendWebNet
,
WebNetName
}
from
"../Scripts/Utils/WebNet/WebNet"
;
import
{
sendWebNet
,
WebNetName
}
from
"../Scripts/Utils/WebNet/WebNet"
;
import
{
getUrlParams
}
from
"../Scripts/Utils/WebNet/web/webTools"
;
import
{
getUrlParams
}
from
"../Scripts/Utils/WebNet/web/webTools"
;
import
store
from
"../Scripts/store/store"
;
import
store
from
"../Scripts/store/store"
;
import
{
MainGame
}
from
"../Scripts/Scenes/MainGame/MainGame"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
...
assets/Start/UICanvas.prefab
View file @
de94fdcf
...
@@ -1763,7 +1763,7 @@
...
@@ -1763,7 +1763,7 @@
"b": 255,
"b": 255,
"a": 255
"a": 255
},
},
"_string": "
加载中
...",
"_string": "
Loading
...",
"_horizontalAlign": 1,
"_horizontalAlign": 1,
"_verticalAlign": 1,
"_verticalAlign": 1,
"_actualFontSize": 32,
"_actualFontSize": 32,
...
...
assets/resources/HomeScene/HomeScene.scene
View file @
de94fdcf
This diff is collapsed.
Click to expand it.
assets/resources/HomeScene/png/返回.png
0 → 100644
View file @
de94fdcf
6.32 KB
assets/resources/HomeScene/png/返回.png.meta
0 → 100644
View file @
de94fdcf
{
"ver": "1.0.27",
"importer": "image",
"imported": true,
"uuid": "f8449379-3802-4387-bce2-a6661f3d267c",
"files": [
".json",
".png"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a",
"displayName": "返回",
"id": "6c48a",
"name": "texture",
"userData": {
"wrapModeS": "clamp-to-edge",
"wrapModeT": "clamp-to-edge",
"imageUuidOrDatabaseUri": "f8449379-3802-4387-bce2-a6661f3d267c",
"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": "f8449379-3802-4387-bce2-a6661f3d267c@f9941",
"displayName": "返回",
"id": "f9941",
"name": "spriteFrame",
"userData": {
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 57,
"height": 57,
"rawWidth": 57,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"packable": true,
"pixelsToUnit": 100,
"pivotX": 0.5,
"pivotY": 0.5,
"meshType": 0,
"vertices": {
"rawPosition": [
-28.5,
-28.5,
0,
28.5,
-28.5,
0,
-28.5,
28.5,
0,
28.5,
28.5,
0
],
"indexes": [
0,
1,
2,
2,
1,
3
],
"uv": [
0,
57,
57,
57,
0,
0,
57,
0
],
"nuv": [
0,
0,
1,
0,
0,
1,
1,
1
],
"minPos": [
-28.5,
-28.5,
0
],
"maxPos": [
28.5,
28.5,
0
]
},
"isUuid": true,
"imageUuidOrDatabaseUri": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a",
"atlasUuid": ""
},
"ver": "1.0.12",
"imported": true,
"files": [
".json"
],
"subMetas": {}
}
},
"userData": {
"type": "sprite-frame",
"hasAlpha": true,
"fixAlphaTransparencyArtifacts": false,
"redirect": "f8449379-3802-4387-bce2-a6661f3d267c@6c48a"
}
}
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