Closed Noah2610 closed 4 years ago
The Bullet
component no longer has a despawn_after_ms
field.
Bullets themselves won't despawn on their own now.
Instead, give bullets the DespawnAfterDelay
component.
components: (
bullet: (), // this is kinda useless,
// it just marks this entity as a bullet.
// maybe this will become useful later on,
// but for now this does basically nothing.
despawn_after_delay: (
delay_ms: 5000,
),
),
Component that makes the entity die after a given delay. Sets the entity's
Lifecycle
state toDeath
after delay.Replace player bullet despawning (
DeleteBulletsSystem
) and custom entity deletion events (like withCustom(DischargeProjectile)
with this.