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

        _rigidbody = this.GetComponent <Rigidbody>();

        _bulletUpdateEvent    = bulletPoolManager.BulletUpdateEvent;
        _bulletCollisionEvent = bulletPoolManager.BulletCollisionEvent;
    }
Пример #3
0
 public void AddEvent(BulletCollisionEvent e)
 {
     BulletCollisionEvent += e;
 }