// Start is called before the first frame update void Start() { //Physics.gravity = new Vector3(0, -1.0F, 0); ExternalRead read = new ExternalRead(); read.ReadItems(this); #if UNITY_EDITOR GameObject.FindObjectOfType <MapManage>().CreateMap(); GameObject.FindObjectOfType <MapManage>().ChangeTile(); gameObject.AddComponent <FPSOnGUIText>(); #endif }
// Start is called before the first frame update void Start() { //物品过多可能有开销问题 //Physics.gravity = new Vector3(0, -1.0F, 0); ExternalRead read = new ExternalRead(); read.ReadItems(this); selectUI = gameObject.transform.Find("LowerBackground/SelectInfo").gameObject; Messenger.AddListener(EventCode.APP_SAVE_GAME, SaveShow); Messenger.AddListener(EventCode.APP_SAVEOVER_GAME, SaveOver); Messenger.AddListener <SelectInfo>(EventCode.UI_SELECT_INFO, SelectInfo); #if UNITY_EDITOR // Game_mo_UI ui = GameObject.FindObjectOfType<Game_mo_UI>(); AppManage.Instance.HUD = gameObject; // isSave = true; GameObject.FindObjectOfType <MapManage>().CreateMap(); // GameObject.FindObjectOfType<MapManage>().ChangeTile(); gameObject.AddComponent <FPSOnGUIText>(); #endif }