Beispiel #1
0
 void OnBulletCollisionEvent(Entity entity, BulletCollisionEvent args)
 {
     if (entity.Has <EnemyComponent>())
     {
         var spin = entity.GetOrAdd <SpinComponent>();
         spin.timeSpinning = 0;
         spin.enabled      = true;
     }
 }
Beispiel #2
0
    protected override void Initialize()
    {
        // 총알 초기화
        BulletPoolManager bulletPoolManager = BulletPoolManager.Instance;

        _rigidbody = this.GetComponent <Rigidbody>();

        _bulletUpdateEvent    = bulletPoolManager.BulletUpdateEvent;
        _bulletCollisionEvent = bulletPoolManager.BulletCollisionEvent;
    }
 public void AddEvent(BulletCollisionEvent e)
 {
     BulletCollisionEvent += e;
 }