Skip to content

Commit 781362a

Browse files
committed
Update Render.cs
1 parent 834af8e commit 781362a

File tree

1 file changed

+9
-6
lines changed
  • Demo/API_V2/Assets/API/Render/Render

1 file changed

+9
-6
lines changed

Demo/API_V2/Assets/API/Render/Render/Render.cs

+9-6
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,22 @@ private void Start()
1515
// 测试 API
1616
protected override void TestAPI(string[] args)
1717
{
18-
setPreferredFramesPerSecond();
18+
setFPS();
1919
}
2020

21-
public void setPreferredFramesPerSecond() {
22-
WX.SetPreferredFramesPerSecond(50);
21+
public void setFPS()
22+
{
23+
Application.targetFrameRate = 30;
2324
}
2425

25-
public void loadFont() {
26+
public void loadFont()
27+
{
2628
var font = WX.LoadFont("TencentSans-W7.subset.ttf");
2729
Debug.Log(font);
2830
}
2931

30-
public void Destroy() {
31-
WX.SetPreferredFramesPerSecond(60);
32+
public void Destroy()
33+
{
34+
Application.targetFrameRate = 60;
3235
}
3336
}

0 commit comments

Comments
 (0)