Excalibur.js logoDocsSamplesCommunityGalleryContributeBlogDonate
Open Table of Contents Close Table of Contents
Documentation
Introduction
WelcomeExcalibur's Philosophy
Getting Started
Installation GuideGetting StartedBuild & Bundlers
Fundamentals
ActorsEngine FundamentalsCamerasScenesClock
Screen & Viewport
DisplayModesScreen & Viewport
Graphics
ColorGraphicsLinesSpritesSpritesheetsText & FontsAnimationCanvasGraphics ComponentGraphics GroupGraphics ContextParallaxPostProcessorsCustom Renderer Plugins
Entity Component System
ECSEntitiesComponentsSystemsQueries
Resources
ImageSourceLoaderSound
Actions
ActionsBlinkCallMethodDelayEaseToMoveTo/MoveByFadeRotateTo/RotateByRepeatDieFollowMeetScaleTo/ScaleBy
TileMaps
Isometric TileMapsTileMap
Math
MatrixRandomRayVector
Physics
BodiesCollidersCollision EventsCollision GroupsCollision TypesPhysics
Input
InputKeyboardPointersGamepad
Migration Guides
Migration
Other
Debugging TipsEventsPatternsTimersTriggersUIParticlesPerformanceHosting Excalibur GamesUtilities
Plugins
Aseprite pluginTiled PluginDev Tool
Examples
API Reference
Edge (latest)v0.26.0v0.25.3v0.25.2v0.25.1v0.25.0

Die

Die is a quick wrapper around Entity.kill to remove something from a scene.

This method will add an action to the queue that will remove the actor from the scene once it has completed its previous Any actions on the action queue after this action will not be executed.

const actor = new ex.Actor({...})
scene.add(actor);

// Move the actor to world position (100, 100) then remove from the scene
actor.moveTo(ex.vec(100, 100), 100).die();
Get Involved
GitHub RepoOpen an IssueAsk a QuestionDonate
Excalibur.js logo
Free & Open Source (BSD 2-Clause)