protected override void InitComponent() { if (_renderer == null) { _renderer = GetComponent <SpriteRenderer>(); } gameObject.AddOrGet <AutoDespawnComponent>(); gameObject.AddOrGet <ItemCollideMsgComponent>().Init(CollideEvent); if (_effectView == null) { _effectView = GetEffectView(); } _effectView.Init(transform); }
public void Init(BulletType bulletType) { switch (bulletType) { case BulletType.Enemy_Boss_1: _effect = BulletEffectPoolConfig.Single.Boss1Pool.Spawn(); break; } if (_effect == null) { return; } _effect.Init(transform); _effect.Begin(); }