private void Dispose(bool disposing) { if (IconMain != null) { IconMain.Dispose(); } if (IconMoney != null) { IconMoney.Dispose(); } if (LabelMain != null) { LabelMain.Dispose(); } if (LabelMoney != null) { LabelMoney.Dispose(); } }
private void Start() { Instance = this; // 建立全域 labelList labelList = new Dictionary <string, LabelNode>(); // 初始化 labelDistanceLimit labelDistanceLimit = 10000000000; // 初始化 selectedToEditLabelDetail selectedToEditLabelDetail = string.Empty; // 預設檔名,防止使用者沒有出入檔名 selectFileNameChange = false; selectMapChosen = false; distChanged = false; selectFileName = "temp"; string dirPath = Application.persistentDataPath + "/" + selectFileName; if (!Directory.Exists(dirPath)) { Directory.CreateDirectory(dirPath); } if (!Directory.Exists(dirPath + "/content")) { Directory.CreateDirectory(dirPath + "/content"); } // 建立暫存檔,selectFileName = "temp" string nodePath = Application.persistentDataPath + "/" + selectFileName + "/" + "map.txt"; string labelPath = Application.persistentDataPath + "/" + selectFileName + "/" + "tag.txt"; StreamWriter nodeWriter = new StreamWriter(nodePath, false, Encoding.UTF8); StreamWriter labeWriter = new StreamWriter(labelPath, false, Encoding.UTF8); nodeWriter.Close(); labeWriter.Close(); // 全域變數建立完成,跳到 AR Scene SceneManager.LoadScene("AR"); }
public override void Draw(GameTime gameTime, Renderer renderer) { base.Draw(gameTime, renderer); if (IconMain != null) { IconMain.Draw(gameTime, renderer); } if (LabelMain != null) { LabelMain.Draw(gameTime, renderer); } if (IconMoney != null) { IconMoney.Draw(gameTime, renderer); } if (LabelMoney != null) { LabelMoney.Draw(gameTime, renderer); } }
public override void Update(GameTime gameTime) { if (IconMain != null) { IconMain.Update(gameTime); } if (LabelMain != null) { LabelMain.Update(gameTime); } if (IconMoney != null) { IconMoney.Update(gameTime); } if (LabelMoney != null) { LabelMoney.Update(gameTime); } // always update ourself first because our base will clear the Clicked flag once it has processed base.Update(gameTime); }