// Use this for initialization void Awake() { m_CitySpawn = transform.FindChild("CitySpawn"); m_Player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>(); m_Player.Init(); Inst = this; }
// Use this for initialization void Awake() { m_Player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>(); m_SkillManager = GameObject.Find("SkillManager").GetComponent<SkillManager>(); m_EnemyManager = GameObject.FindGameObjectWithTag("EnemyManager").GetComponent<EnemyManager>(); m_AttribPanel = GameObject.Find("MainUICanvas/AttribPanel").GetComponent<AttributePanel>(); m_DamageHudControl = GameObject.Find("DamageHudCanvas").GetComponent<DamageHudControl>(); Button atkBtn = GameObject.Find("MainUICanvas/AttackBtn").GetComponent<Button>(); atkBtn.onClick.AddListener(ProcessAttack); m_ItemDropManager = new ItemDropManager(); m_ItemDropManager.Init(); m_PlayerSpawn = transform.FindChild("Tutorial").FindChild("PlayerSpawn"); // 需要控制初始化时机的脚本在此处初始化 m_EnemyManager.Init(); m_DamageHudControl.Init(); Inst = this; OnSleep(); }