public void Initialize(AttackType type, AttackStats stats) { m_pAttackStats = Instantiate(stats) as AttackStats; m_pAttackStats.transform.parent = this.transform; m_pAttackStats.gameObject.layer = this.gameObject.layer; m_pAttackType = Instantiate(type) as AttackType; m_pAttackType.transform.parent = this.transform; m_pAttackType.gameObject.layer = this.gameObject.layer; m_pAttackType.Initialize(this); }