public void Set(Transform cTransform) { m_cTransform = cTransform; m_cGunObject = m_cTransform.Find("Gun").gameObject; m_scGun = m_cTransform.GetComponent <AdventurerGun>(); m_scLife = m_cTransform.GetComponent <AdventurerLife>(); m_scMove = m_cTransform.GetComponent <AdventurerMove>(); }
// Use this for initialization void Start() { m_scLife = GetComponent <AdventurerLife>(); m_scGun = GetComponent <AdventurerGun>(); m_scMove = GetComponent <AdventurerMove>(); }