Unity C# 代码优化: 如何让代码只执行一次
public bool Tip=true;public GameObject gameTips;\n\n// Start is called before the first frame update\nvoid Start()\n{\n\tTip = false;\n}\n\n// Update is called once per frame\nvoid Update()\n{\n\tif (Tip)\n\t{\n\t\tgameTips.SetActive(true);\n\t\tTip = false;\n\t}\n\telse\n\t{\n\t\tgameTips.SetActive(false);\n\t}\n}
原文地址: https://www.cveoy.top/t/topic/pYT6 著作权归作者所有。请勿转载和采集!