@rpgjs/server 5.0.0-beta.6 → 5.0.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -639,8 +639,41 @@ export declare class RpgEvent extends RpgPlayer {
639
639
  *
640
640
  * Stops all movements before removing to prevent "unable to resolve entity" errors
641
641
  * from the MovementManager when the entity is destroyed while moving.
642
+ *
643
+ * Pass options to keep the sprite visible briefly on clients while
644
+ * `sprite.onBeforeRemove` runs a visual transition. Gameplay collision is
645
+ * removed immediately; the event is deleted from the map after `timeoutMs`.
646
+ *
647
+ * The server only sends the removal context. The client decides how to render
648
+ * `transition` in `sprite.onBeforeRemove`, so the payload can describe an
649
+ * animation, sound, particle effect, GUI transition, or project-specific data.
650
+ *
651
+ * @example
652
+ * ```ts
653
+ * event.remove({
654
+ * reason: 'defeated',
655
+ * transition: {
656
+ * type: 'enemy-death',
657
+ * animation: 'die',
658
+ * graphic: 'slime_die',
659
+ * sound: 'slime-death',
660
+ * duration: 700
661
+ * },
662
+ * timeoutMs: 700
663
+ * })
664
+ * ```
642
665
  */
643
- remove(): void;
666
+ remove(options?: {
667
+ reason?: string;
668
+ data?: any;
669
+ transition?: {
670
+ animation?: string;
671
+ graphic?: string | string[];
672
+ duration?: number;
673
+ effect?: string;
674
+ };
675
+ timeoutMs?: number;
676
+ }): void;
644
677
  isEvent(): boolean;
645
678
  }
646
679
  /**