private void VanishBullet(ulong id) { var vanish = new BulletVanishInfo() { ShooterEntityId = SpatialComp.EntityId.Id, BulletId = id, }; this.BulletWriter.SendVanishesEvent(vanish); }
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); }
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; }
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); }