void Start() { mBomb = GetComponentInParent <Bomb>(); // mStrikeBoxTransform = GameObjectUtil.FindChildTransformByTag(transform.root, TagName.STRIKE_BOX); mSphereCollider = GameObjectUtil.FindChildTransformByTag(transform.root, TagName.STRIKE_BOX).GetComponent <SphereCollider>(); }
// protected void HandleInitAttributes() // { // if(mInitAttributes) // { // mHitBoxCollider = GameObjectUtil.FindChildTransformByTag(transform, TagName.HIT_BOX).GetComponent<Collider>(); // mController = GetComponent<BaseController>(); // mMadBomberData = GetComponentInParent<MadBomberData>(); // mPlayerManager = GetComponentInParent<PlayerManager>(); // mInitAttributes = false; // } // } public void InitAttributes() { mHitBoxCollider = GameObjectUtil.FindChildTransformByTag(transform, TagName.HIT_BOX).GetComponent <Collider>(); mController = GetComponent <BaseController>(); mMadBomberData = GetComponentInParent <MadBomberData>(); mPlayerManager = GetComponentInParent <PlayerManager>(); }
protected void Start() { mHitBoxCollider = GameObjectUtil.FindChildTransformByTag(transform, TagName.HIT_BOX).GetComponent <Collider>(); mStrikeBoxCollider = GameObjectUtil.FindChildTransformByTag(transform, TagName.STRIKE_BOX).GetComponent <Collider>(); mController = GetComponent <BaseController>(); mEnemyData = GetComponent <EnemyData>(); }
void Start() { mBomb = GetComponentInParent <Bomb>(); Transform mStrikeBoxGameObjectTransform = GameObjectUtil.FindChildTransformByTag(transform.root, TagName.STRIKE_BOX); mStrikeBoxTransform = GameObjectUtil.FindChildTransformByTag(mStrikeBoxGameObjectTransform, mStrikeBoxTag); mBoxCollider = mStrikeBoxTransform.GetComponent <BoxCollider>(); }
void Start() { mBomb = GetComponentInParent <Bomb>(); mParticleSystem = GetComponent <ParticleSystem>(); Transform strikeBoxTransform = GameObjectUtil.FindChildTransformByTag(transform.root, TagName.STRIKE_BOX); mBoxCollider = GameObjectUtil.FindChildTransformByTag(strikeBoxTransform, mStrikeBoxTag).GetComponent <BoxCollider>(); }