Exemplo n.º 1
0
        private void VanishBullet(ulong id)
        {
            var vanish = new BulletVanishInfo()
            {
                ShooterEntityId = SpatialComp.EntityId.Id,
                BulletId        = id,
            };

            this.BulletWriter.SendVanishesEvent(vanish);
        }
Exemplo n.º 2
0
        private void VanishBullet(uint type, ulong id)
        {
            if (this.BulletWriter == null)
            {
                return;
            }

            var vanish = new BulletVanishInfo()
            {
                ShooterEntityId = SpatialComp.EntityId.Id,
                Type            = type,
                BulletId        = id,
            };

            this.BulletWriter.SendVanishesEvent(vanish);
        }
Exemplo n.º 3
0
            public void OnVanish(BulletVanishInfo info)
            {
                if (bulletsDic.TryGetValue(info.ShooterEntityId, out var dic) == false)
                {
                    return;
                }

                if (dic.TryGetValue(info.BulletId, out var bullet) == false)
                {
                    return;
                }

                var fireComponent = bullet.Fire;
                var b             = fireComponent.Value;

                fireComponent.Value = new BulletInfo(b, 0);
                bullet.IsActive     = false;
            }
Exemplo n.º 4
0
        public void OnVanish(BulletVanishInfo info)
        {
            Dictionary <ulong, Rigidpair> dic;

            if (bulletsDic.TryGetValue(info.ShooterEntityId, out dic) == false)
            {
                return;
            }

            Rigidpair bullet;

            if (dic.TryGetValue(info.BulletId, out bullet) == false)
            {
                return;
            }

            var fireComponent = bullet.Fire;
            var b             = fireComponent.Value;

            fireComponent.Value = new BulletInfo(b, 0);
            bullet.IsActive     = false;
        }
 private void Vanish(BulletVanishInfo info)
 {
     base.Creator?.OnVanish(info);
 }