Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
顺
顺职VR迷宫游戏教学
Project
Project
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨泽宇
顺职VR迷宫游戏教学
Commits
f2bfc70a
Commit
f2bfc70a
authored
Mar 01, 2024
by
杨泽宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0e653859
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
GameSystem.cs
Assets/_Scripts/GameSystem.cs
+8
-4
No files found.
Assets/_Scripts/GameSystem.cs
View file @
f2bfc70a
...
...
@@ -17,8 +17,6 @@ public class GameSystem : SingletonBase<GameSystem>
public
GameObject
PauseUI
;
[
Tooltip
(
"暂停后处理"
)]
public
GameObject
PausePostProcessing
;
[
Tooltip
(
"主摄像机后处理"
)]
public
GameObject
MainPostProcessing
;
[
Tooltip
(
"当前剩余时间"
)]
private
float
currentTime
;
...
...
@@ -107,14 +105,21 @@ public class GameSystem : SingletonBase<GameSystem>
/// 暂停游戏
/// </summary>
public
void
PauseGame
()
{
StartCoroutine
(
PauseGameCoroutine
());
}
private
IEnumerator
PauseGameCoroutine
()
{
PausePostProcessing
.
SetActive
(
true
);
MainPostProcessing
.
SetActive
(
false
);
yield
return
new
WaitForSeconds
(
1f
);
Time
.
timeScale
=
0f
;
isPauseGame
=
true
;
PauseUI
.
SetActive
(
true
);
}
/// <summary>
/// 暂停游戏
/// </summary>
...
...
@@ -136,7 +141,6 @@ public class GameSystem : SingletonBase<GameSystem>
public
void
ResumeGame
()
{
PausePostProcessing
.
SetActive
(
false
);
MainPostProcessing
.
SetActive
(
true
);
Time
.
timeScale
=
1f
;
isPauseGame
=
false
;
PauseUI
.
SetActive
(
false
);
...
...
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