Skip to content

Commit

Permalink
通过代码设置版本
Browse files Browse the repository at this point in the history
  • Loading branch information
peng1999 committed Oct 7, 2019
1 parent c040fc1 commit 971ee31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
18 changes: 10 additions & 8 deletions Assets/Scenes/MainScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ GameObject:
- component: {fileID: 215313479}
- component: {fileID: 215313478}
m_Layer: 5
m_Name: Text (TMP)
m_Name: Version
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -178,7 +178,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_text: 1.1.1
m_text: 1.*
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: ace54f8fedf1b834b9a6860a473115b6, type: 2}
m_sharedMaterial: {fileID: -200639151326893713, guid: ace54f8fedf1b834b9a6860a473115b6,
Expand Down Expand Up @@ -248,10 +248,10 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo:
textComponent: {fileID: 215313478}
characterCount: 5
characterCount: 3
spriteCount: 0
spaceCount: 0
wordCount: 3
wordCount: 1
linkCount: 0
lineCount: 1
pageCount: 1
Expand Down Expand Up @@ -889,6 +889,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
aboutPage: {fileID: 1069566573}
cornerText: {fileID: 769260644}
versionNumber: {fileID: 215313478}
--- !u!1 &769260642
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -901,7 +903,7 @@ GameObject:
- component: {fileID: 769260645}
- component: {fileID: 769260644}
m_Layer: 5
m_Name: Version
m_Name: CornerText
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -946,7 +948,7 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_text: Simuro5v5 v1.1.1
m_text: Simuro5v5 v1.*
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
Expand Down Expand Up @@ -1015,10 +1017,10 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 5, w: 0}
m_textInfo:
textComponent: {fileID: 769260644}
characterCount: 16
characterCount: 14
spriteCount: 0
spaceCount: 1
wordCount: 4
wordCount: 2
linkCount: 0
lineCount: 1
pageCount: 1
Expand Down
9 changes: 8 additions & 1 deletion Assets/Scripts/Scene/Main/UI/GUI_MainMenu.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
using Simuro5v5;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class GUI_MainMenu : MonoBehaviour
{
public GameObject aboutPage;
public TMP_Text cornerText;
public TMP_Text versionNumber;

private const string Version = "1.1.1";

void Start()
{
Screen.fullScreen = false;
Configuration.ReadFromFileOrCreate("config.json");
aboutPage.SetActive(false);
}
cornerText.text = $"Simuro5v5 v{Version}";
versionNumber.text = Version;
}

private void Update()
{
Expand Down

0 comments on commit 971ee31

Please sign in to comment.