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
db9a87da
Commit
db9a87da
authored
Sep 25, 2024
by
haiyoucuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上传
parent
b4f69e7d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
8 deletions
+41
-8
AppTool.ts
assets/Scripts/AppTool.ts
+23
-0
PrizePanel.ts
assets/Scripts/Panels/PrizePanel.ts
+7
-2
MainGame.ts
assets/Scripts/Scenes/MainGame/MainGame.ts
+4
-0
Start.ts
assets/Start/Start.ts
+2
-1
packages.json
profiles/v2/editor/packages.json
+1
-1
scene.json
profiles/v2/packages/scene.json
+4
-4
No files found.
assets/Scripts/AppTool.ts
View file @
db9a87da
...
@@ -9,4 +9,27 @@ export function popWindow() {
...
@@ -9,4 +9,27 @@ export function popWindow() {
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
}
}
mdEvent
({
pageView
:
"leaveGame"
,
});
}
export
const
gameId
=
"2171020205274922"
;
export
function
mdEvent
(
options
)
{
const
{
pageView
,
clickName
,
additionalInfo
}
=
options
;
try
{
window
[
"my"
].
postMessage
({
type
:
"tngdMPEventTagging"
,
pageView
:
`
${
pageView
}
-
${
gameId
}
`
,
clickName
:
clickName
,
additionalInfo
:
additionalInfo
,
});
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
}
\ No newline at end of file
assets/Scripts/Panels/PrizePanel.ts
View file @
db9a87da
...
@@ -4,7 +4,7 @@ import { changeScene, showPanel } from "db://assets/Module/UIFast";
...
@@ -4,7 +4,7 @@ import { changeScene, showPanel } from "db://assets/Module/UIFast";
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
HomeScene
}
from
"db://assets/Scripts/Scenes/HomeScene"
;
import
{
strFormat
}
from
"../Utils/Utils"
;
import
{
strFormat
}
from
"../Utils/Utils"
;
import
RankPanel
from
"./RankPanel"
;
import
RankPanel
from
"./RankPanel"
;
import
{
popWindow
}
from
"../AppTool"
;
import
{
mdEvent
,
popWindow
}
from
"../AppTool"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -37,7 +37,12 @@ export default class PrizePanel extends Panel {
...
@@ -37,7 +37,12 @@ export default class PrizePanel extends Panel {
async
start
()
{
async
start
()
{
const
{
prizeVO
,
highest
,
score
}
=
this
.
data
;
const
{
prizeVO
,
highest
,
score
}
=
this
.
data
;
const
{
optionName
,
optionImg
}
=
prizeVO
;
const
{
optionName
,
optionImg
,
rewardId
}
=
prizeVO
;
mdEvent
({
pageView
:
"issueReward"
,
additionalInfo
:
rewardId
,
});
this
.
highestLabel
.
string
=
highest
;
this
.
highestLabel
.
string
=
highest
;
this
.
scoreLabel
.
string
=
score
;
this
.
scoreLabel
.
string
=
score
;
...
...
assets/Scripts/Scenes/MainGame/MainGame.ts
View file @
db9a87da
...
@@ -26,6 +26,7 @@ import { Wall } from "./Wall";
...
@@ -26,6 +26,7 @@ import { Wall } from "./Wall";
import
{
sleep
}
from
"../../Utils/Utils"
;
import
{
sleep
}
from
"../../Utils/Utils"
;
import
GameMgr
from
"../../GameMgr"
;
import
GameMgr
from
"../../GameMgr"
;
import
{
AudioMgr
}
from
"../../../core_tgx/base/AudioMgr"
;
import
{
AudioMgr
}
from
"../../../core_tgx/base/AudioMgr"
;
import
{
mdEvent
}
from
"../../AppTool"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -99,6 +100,9 @@ export class MainGame extends Scene {
...
@@ -99,6 +100,9 @@ export class MainGame extends Scene {
maxZ
=
0
;
maxZ
=
0
;
onLoad
()
{
onLoad
()
{
mdEvent
({
pageView
:
"gamsStart"
});
const
playerCollider
=
this
.
player
.
getComponent
(
Collider
);
const
playerCollider
=
this
.
player
.
getComponent
(
Collider
);
playerCollider
.
on
(
"onCollisionEnter"
,
this
.
onPlayerCollision
,
this
);
playerCollider
.
on
(
"onCollisionEnter"
,
this
.
onPlayerCollision
,
this
);
playerCollider
.
on
(
'onTriggerEnter'
,
this
.
onTriggerEnter
,
this
);
playerCollider
.
on
(
'onTriggerEnter'
,
this
.
onTriggerEnter
,
this
);
...
...
assets/Start/Start.ts
View file @
db9a87da
...
@@ -20,6 +20,7 @@ import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools";
...
@@ -20,6 +20,7 @@ import { getUrlParams } from "../Scripts/Utils/WebNet/web/webTools";
import
store
from
"../Scripts/store/store"
;
import
store
from
"../Scripts/store/store"
;
import
{
AudioMgr
}
from
"../core_tgx/base/AudioMgr"
;
import
{
AudioMgr
}
from
"../core_tgx/base/AudioMgr"
;
import
{
MusicBtn
}
from
"../Component/MusicBtn/MusicBtn"
;
import
{
MusicBtn
}
from
"../Component/MusicBtn/MusicBtn"
;
import
{
gameId
}
from
"../Scripts/AppTool"
;
const
{
ccclass
,
property
}
=
_decorator
;
const
{
ccclass
,
property
}
=
_decorator
;
...
@@ -110,7 +111,7 @@ export class Start extends Component {
...
@@ -110,7 +111,7 @@ export class Start extends Component {
const
{
success
,
data
}
=
await
sendWebNet
(
WebNetName
.
autologin
,
{
const
{
success
,
data
}
=
await
sendWebNet
(
WebNetName
.
autologin
,
{
authCode
:
authCode
,
authCode
:
authCode
,
appId
:
"2171020205274922"
appId
:
gameId
,
});
});
if
(
!
success
)
{
if
(
!
success
)
{
...
...
profiles/v2/editor/packages.json
View file @
db9a87da
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
"8"
:
{
"8"
:
{
"3
\\
extension"
:
{
"3
\\
extension"
:
{
"name"
:
"extension"
,
"name"
:
"extension"
,
"time"
:
1727
171927547
"time"
:
1727
228579670
}
}
}
}
}
}
...
...
profiles/v2/packages/scene.json
View file @
db9a87da
...
@@ -1267,8 +1267,8 @@
...
@@ -1267,8 +1267,8 @@
},
},
"53947ca7-3484-4b53-800d-509405063d68"
:
{
"53947ca7-3484-4b53-800d-509405063d68"
:
{
"position"
:
{
"position"
:
{
"x"
:
307.5923439960044
4
,
"x"
:
432.8004646906813
4
,
"y"
:
895.7793252028572
,
"y"
:
984.2290985376288
,
"z"
:
5000
"z"
:
5000
},
},
"rotation"
:
{
"rotation"
:
{
...
@@ -1283,8 +1283,8 @@
...
@@ -1283,8 +1283,8 @@
"z"
:
0
"z"
:
0
},
},
"contentRect"
:
{
"contentRect"
:
{
"x"
:
-
363.2474953222643
,
"x"
:
-
112.8312539329105
,
"y"
:
102.02876189990567
,
"y"
:
278.9283085694491
,
"width"
:
408.8
,
"width"
:
408.8
,
"height"
:
483.7
"height"
:
483.7
},
},
...
...
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