Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TXZS_G_005
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
TXZS_G_005
Commits
f9ecc10f
Commit
f9ecc10f
authored
Apr 13, 2023
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug
parent
98e34b12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
TXZS_G_005.ts
assets/TXZS_G_005/scene/TXZS_G_005.ts
+12
-12
No files found.
assets/TXZS_G_005/scene/TXZS_G_005.ts
View file @
f9ecc10f
...
@@ -64,13 +64,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -64,13 +64,13 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
}
onLoadEnd
()
{
onLoadEnd
()
{
cc
.
macro
.
ENABLE_MULTI_TOUCH
=
false
;
//
cc.macro.ENABLE_MULTI_TOUCH = false;
// // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
// // TODO 加载完成后的逻辑写在这里, 下面的代码仅供参考
//
this.initData();
this
.
initData
();
//
this.initView();
this
.
initView
();
//
this.initEvent();
this
.
initEvent
();
//
this.startTime();
this
.
startTime
();
//
this.updateTop();
this
.
updateTop
();
}
}
protected
onDestroy
():
void
{
protected
onDestroy
():
void
{
cc
.
Tween
.
stopAll
();
cc
.
Tween
.
stopAll
();
...
@@ -233,12 +233,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
...
@@ -233,12 +233,12 @@ export default class SceneComponent extends MyCocosSceneComponent {
private
startSecond
:
boolean
;
private
startSecond
:
boolean
;
update
(
dt
)
{
update
(
dt
)
{
//
if (Game.getIns().state != GAME_STATE.RUNNING) return;
if
(
Game
.
getIns
().
state
!=
GAME_STATE
.
RUNNING
)
return
;
//
if (!this.startSecond) return;
if
(
!
this
.
startSecond
)
return
;
//
this.timeSecond = this.timeSecond + dt;
this
.
timeSecond
=
this
.
timeSecond
+
dt
;
//
let count = Math.ceil(this.timeSecond);
let
count
=
Math
.
ceil
(
this
.
timeSecond
);
//
let str = this.formatSeconds(count);
let
str
=
this
.
formatSeconds
(
count
);
//
this.label_time.getComponent(cc.Label).string = str;
this
.
label_time
.
getComponent
(
cc
.
Label
).
string
=
str
;
}
}
private
formatSeconds
(
value
)
{
private
formatSeconds
(
value
)
{
var
secondTime
=
parseInt
(
value
);
// 秒
var
secondTime
=
parseInt
(
value
);
// 秒
...
...
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