Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
MDPro2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaoye
MDPro2
Commits
1eb0b9a0
Commit
1eb0b9a0
authored
Jul 19, 2023
by
赤子奈落
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add switch for displaying fps
parent
a3468b51
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
659 additions
and
39 deletions
+659
-39
Assets/ArtSystem/Setting/LAZYsetting.cs
Assets/ArtSystem/Setting/LAZYsetting.cs
+1
-0
Assets/MD/Scripts/ShowFPS.cs
Assets/MD/Scripts/ShowFPS.cs
+33
-0
Assets/MD/Scripts/ShowFPS.cs.meta
Assets/MD/Scripts/ShowFPS.cs.meta
+11
-0
Assets/MD/main.unity
Assets/MD/main.unity
+608
-36
Assets/SibylSystem/Setting/Setting.cs
Assets/SibylSystem/Setting/Setting.cs
+3
-0
ProjectSettings/QualitySettings.asset
ProjectSettings/QualitySettings.asset
+3
-3
No files found.
Assets/ArtSystem/Setting/LAZYsetting.cs
View file @
1eb0b9a0
...
...
@@ -37,6 +37,7 @@ public class LAZYsetting : MonoBehaviour
public
UIToggle
handm
;
public
UIToggle
spyer
;
public
UIToggle
confirmLeft
;
public
UIToggle
fps
;
public
UILabel
character0
;
public
UILabel
character1
;
public
UILabel
field0
;
...
...
Assets/MD/Scripts/ShowFPS.cs
0 → 100644
View file @
1eb0b9a0
using
UnityEngine
;
using
System.Collections
;
using
DG.Tweening
;
public
class
ShowFPS
:
MonoBehaviour
{
private
float
m_lastUpdateShowTime
=
0f
;
private
readonly
float
m_updateTime
=
0.5f
;
private
int
m_frames
=
0
;
private
float
m_FPS
=
0
;
UILabel
m_label
;
private
void
Start
()
{
m_lastUpdateShowTime
=
Time
.
realtimeSinceStartup
;
m_label
=
GetComponent
<
UILabel
>();
}
private
void
Update
()
{
m_frames
++;
if
(
Time
.
realtimeSinceStartup
-
m_lastUpdateShowTime
>=
m_updateTime
)
{
m_FPS
=
m_frames
/
(
Time
.
realtimeSinceStartup
-
m_lastUpdateShowTime
);
m_lastUpdateShowTime
=
Time
.
realtimeSinceStartup
;
m_frames
=
0
;
if
(
Program
.
I
().
setting
.
setting
.
fps
.
value
)
m_label
.
text
=
"FPS: "
+
(
int
)
m_FPS
;
else
m_label
.
text
=
""
;
}
}
}
\ No newline at end of file
Assets/MD/Scripts/ShowFPS.cs.meta
0 → 100644
View file @
1eb0b9a0
fileFormatVersion: 2
guid: e88b1f7666e90ab4d8f8c3b184083de8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/MD/main.unity
View file @
1eb0b9a0
This diff is collapsed.
Click to expand it.
Assets/SibylSystem/Setting/Setting.cs
View file @
1eb0b9a0
...
...
@@ -49,6 +49,7 @@ public class Setting : WindowServant2D
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"handmPosition_"
,
"1"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"spyer_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"spyer_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"confirmLeft_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"confirmLeft_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"showFPS_"
).
value
=
UIHelper
.
fromStringToBool
(
Config
.
Get
(
"showFPS_"
,
"0"
));
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"resize_"
).
canChange
=
false
;
if
(
QualitySettings
.
GetQualityLevel
()
<
3
)
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"high_"
).
value
=
false
;
...
...
@@ -62,6 +63,7 @@ public class Setting : WindowServant2D
UIHelper
.
registEvent
(
gameObject
,
"handmPosition_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"spyer_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"confirmLeft_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"showFPS_"
,
save
);
UIHelper
.
registEvent
(
gameObject
,
"high_"
,
save
);
//Program.go(2000, readVales);
...
...
@@ -330,6 +332,7 @@ public class Setting : WindowServant2D
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"handmPosition_"
).
value
));
Config
.
Set
(
"spyer_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"spyer_"
).
value
));
Config
.
Set
(
"confirmLeft_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"confirmLeft_"
).
value
));
Config
.
Set
(
"showFPS_"
,
UIHelper
.
fromBoolToString
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"showFPS_"
).
value
));
if
(
UIHelper
.
getByName
<
UIToggle
>(
gameObject
,
"high_"
).
value
)
QualitySettings
.
SetQualityLevel
(
5
);
else
...
...
ProjectSettings/QualitySettings.asset
View file @
1eb0b9a0
...
...
@@ -4,7 +4,7 @@
QualitySettings
:
m_ObjectHideFlags
:
0
serializedVersion
:
5
m_CurrentQuality
:
0
m_CurrentQuality
:
5
m_QualitySettings
:
-
serializedVersion
:
2
name
:
Fastest
...
...
@@ -202,8 +202,8 @@ QualitySettings:
shadowNearPlaneOffset
:
3
shadowCascade2Split
:
0.33333334
shadowCascade4Split
:
{
x
:
0.06666667
,
y
:
0.19999999
,
z
:
0.46666664
}
shadowmaskMode
:
0
skinWeights
:
4
shadowmaskMode
:
1
skinWeights
:
1
textureQuality
:
0
anisotropicTextures
:
2
antiAliasing
:
0
...
...
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