UNPKG

duckengine

Version:
116 lines 63.9 kB
<!DOCTYPE html><html class="default no-js"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Hitbox | DuckEngine - v2.1.0</title><meta name="description" content="Documentation for DuckEngine - v2.1.0"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">DuckEngine - v2.1.0</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">DuckEngine - v2.1.0</a></li><li><a href="../modules/core_physics_models_hitbox.html">core/physics/models/hitbox</a></li><li><a href="core_physics_models_hitbox.Hitbox.html">Hitbox</a></li></ul><h1>Class Hitbox</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>classdesc</dt><dd><p>Creates a DuckEngine Hitbox</p> </dd><dt>description</dt><dd><p>The Hitbox Class. A AABB Hitbox used for Colliders</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">Hitbox</span></li></ul></section><section class="tsd-panel"><h3>Implements</h3><ul class="tsd-hierarchy"><li><a href="../interfaces/index.Duck.Types.Renderable.html" class="tsd-signature-type" data-tsd-kind="Interface">Renderable</a></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#collisionState" class="tsd-kind-icon">collision<wbr/>State</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#culled" class="tsd-kind-icon">culled</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#debugColor" class="tsd-kind-icon">debug<wbr/>Color</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#game" class="tsd-kind-icon">game</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#h" class="tsd-kind-icon">h</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#offset" class="tsd-kind-icon">offset</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#physicsObject" class="tsd-kind-icon">physics<wbr/>Object</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#position" class="tsd-kind-icon">position</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#scene" class="tsd-kind-icon">scene</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#visible" class="tsd-kind-icon">visible</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#w" class="tsd-kind-icon">w</a></li><li class="tsd-kind-property tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#zIndex" class="tsd-kind-icon">z<wbr/>Index</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#_draw" class="tsd-kind-icon">_draw</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#_update" class="tsd-kind-icon">_update</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#auto" class="tsd-kind-icon">auto</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getBottom" class="tsd-kind-icon">get<wbr/>Bottom</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getCenter" class="tsd-kind-icon">get<wbr/>Center</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getCenterX" class="tsd-kind-icon">get<wbr/>CenterX</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getCenterY" class="tsd-kind-icon">get<wbr/>CenterY</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getLeft" class="tsd-kind-icon">get<wbr/>Left</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getRight" class="tsd-kind-icon">get<wbr/>Right</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#getTop" class="tsd-kind-icon">get<wbr/>Top</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#groupIntersectsFaceWith" class="tsd-kind-icon">group<wbr/>Intersects<wbr/>Face<wbr/>With</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#intersectsFaceWith" class="tsd-kind-icon">intersects<wbr/>Face<wbr/>With</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#intersectsWith" class="tsd-kind-icon">intersects<wbr/>With</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#scale" class="tsd-kind-icon">scale</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#setDebugColor" class="tsd-kind-icon">set<wbr/>Debug<wbr/>Color</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="core_physics_models_hitbox.Hitbox.html#setPosition" class="tsd-kind-icon">set<wbr/>Position</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">new <wbr/>Hitbox<span class="tsd-signature-symbol">(</span>position<span class="tsd-signature-symbol">: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a>, w<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, h<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, offset<span class="tsd-signature-symbol">: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a>, physicsObject<span class="tsd-signature-symbol">: </span><a href="core_physics_physicsBody.PhysicsBody.html" class="tsd-signature-type" data-tsd-kind="Class">PhysicsBody</a><span class="tsd-signature-symbol">&lt;</span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html" class="tsd-signature-type" data-tsd-kind="Namespace">Texture</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html#Type" class="tsd-signature-type" data-tsd-kind="Type alias">Type</a><span class="tsd-signature-symbol">&gt;</span>, game<span class="tsd-signature-symbol">: </span><a href="core_game.Game.html" class="tsd-signature-type" data-tsd-kind="Class">Game</a>, scene<span class="tsd-signature-symbol">: </span><a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a>, debugColor<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L135">core/physics/models/hitbox.ts:135</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>position: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The position of the Hitbox</p> </div></div></li><li><h5>w: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The width of the Hitbox</p> </div></div></li><li><h5>h: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The height of the Hitbox</p> </div></div></li><li><h5>offset: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The offset position of the Hitbox</p> </div></div></li><li><h5>physicsObject: <a href="core_physics_physicsBody.PhysicsBody.html" class="tsd-signature-type" data-tsd-kind="Class">PhysicsBody</a><span class="tsd-signature-symbol">&lt;</span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html" class="tsd-signature-type" data-tsd-kind="Namespace">Texture</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html#Type" class="tsd-signature-type" data-tsd-kind="Type alias">Type</a><span class="tsd-signature-symbol">&gt;</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The PhysicsBody that the Hitbox is attached to</p> </div></div></li><li><h5>game: <a href="core_game.Game.html" class="tsd-signature-type" data-tsd-kind="Class">Game</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Game instance</p> </div></div></li><li><h5>scene: <a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Scene instance</p> </div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> debugColor: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="collisionState" class="tsd-anchor"></a><h3>collision<wbr/>State</h3><div class="tsd-signature tsd-kind-icon">collision<wbr/>State<span class="tsd-signature-symbol">:</span> <a href="../modules/index.Duck.Types.Collider.html#CollisionResponseType" class="tsd-signature-type" data-tsd-kind="Type alias">CollisionResponseType</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L121">core/physics/models/hitbox.ts:121</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>A string determining the state of the current collision</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="culled" class="tsd-anchor"></a><h3>culled</h3><div class="tsd-signature tsd-kind-icon">culled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#culled">culled</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L113">core/physics/models/hitbox.ts:113</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Determines if the Hitbox should be visible by the current scene&#39;s current camera</p> </dd><dt>since</dt><dd><p>2.1.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="debugColor" class="tsd-anchor"></a><h3>debug<wbr/>Color</h3><div class="tsd-signature tsd-kind-icon">debug<wbr/>Color<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L89">core/physics/models/hitbox.ts:89</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The debug color of the Hitbox, determines if the visibility of the hitbox</p> </dd><dt>since</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="game" class="tsd-anchor"></a><h3>game</h3><div class="tsd-signature tsd-kind-icon">game<span class="tsd-signature-symbol">:</span> <a href="core_game.Game.html" class="tsd-signature-type" data-tsd-kind="Class">Game</a></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#game">game</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L65">core/physics/models/hitbox.ts:65</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Game instance</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="h" class="tsd-anchor"></a><h3>h</h3><div class="tsd-signature tsd-kind-icon">h<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L57">core/physics/models/hitbox.ts:57</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The Height of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="id" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> id</h3><div class="tsd-signature tsd-kind-icon">id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#id">id</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L25">core/physics/models/hitbox.ts:25</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The unique identifier for a Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="offset" class="tsd-anchor"></a><h3>offset</h3><div class="tsd-signature tsd-kind-icon">offset<span class="tsd-signature-symbol">:</span> <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L41">core/physics/models/hitbox.ts:41</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The Offset Position of the hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="physicsObject" class="tsd-anchor"></a><h3>physics<wbr/>Object</h3><div class="tsd-signature tsd-kind-icon">physics<wbr/>Object<span class="tsd-signature-symbol">:</span> <a href="core_physics_physicsBody.PhysicsBody.html" class="tsd-signature-type" data-tsd-kind="Class">PhysicsBody</a><span class="tsd-signature-symbol">&lt;</span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html" class="tsd-signature-type" data-tsd-kind="Namespace">Texture</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html#Type" class="tsd-signature-type" data-tsd-kind="Type alias">Type</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L81">core/physics/models/hitbox.ts:81</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>PhysicsBody that the Hitbox is attached to</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="position" class="tsd-anchor"></a><h3>position</h3><div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L33">core/physics/models/hitbox.ts:33</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The Position of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="scene" class="tsd-anchor"></a><h3>scene</h3><div class="tsd-signature tsd-kind-icon">scene<span class="tsd-signature-symbol">:</span> <a href="core_scene.Scene.html" class="tsd-signature-type" data-tsd-kind="Class">Scene</a></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L73">core/physics/models/hitbox.ts:73</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Scene instance</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="visible" class="tsd-anchor"></a><h3>visible</h3><div class="tsd-signature tsd-kind-icon">visible<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#visible">visible</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L97">core/physics/models/hitbox.ts:97</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Determines if the Hitbox will be drawn on the screen as a debug aid</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="w" class="tsd-anchor"></a><h3>w</h3><div class="tsd-signature tsd-kind-icon">w<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L49">core/physics/models/hitbox.ts:49</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The Width of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="zIndex" class="tsd-anchor"></a><h3>z<wbr/>Index</h3><div class="tsd-signature tsd-kind-icon">z<wbr/>Index<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#zIndex">zIndex</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L105">core/physics/models/hitbox.ts:105</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>The zIndex of the Hitbox, effects how the Hitbox is layered if it is drawn on the screen as a debug aid</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_draw" class="tsd-anchor"></a><h3>_draw</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">_draw<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/index.Duck.Types.Renderable.html">Renderable</a>.<a href="../interfaces/index.Duck.Types.Renderable.html#_draw">_draw</a></p><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L170">core/physics/models/hitbox.ts:170</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Draws the hitbox if a debugColor is passed in the constructor.</p> <p>DO NOT CALL MANUALLY, CALLED IN GAME LOOP USING SCENE.displayList</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="_update" class="tsd-anchor"></a><h3>_update</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">_update<span class="tsd-signature-symbol">(</span>physicsObject<span class="tsd-signature-symbol">: </span><a href="core_physics_physicsBody.PhysicsBody.html" class="tsd-signature-type" data-tsd-kind="Class">PhysicsBody</a><span class="tsd-signature-symbol">&lt;</span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html" class="tsd-signature-type" data-tsd-kind="Namespace">Texture</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html#Type" class="tsd-signature-type" data-tsd-kind="Type alias">Type</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L196">core/physics/models/hitbox.ts:196</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Sets the Hitboxes position to the PhysicsBodies position plus the passed offset if one was set</p> <p>DO NOT CALL MANUALLY, CALLED IN SCENE.__tick</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>physicsObject: <a href="core_physics_physicsBody.PhysicsBody.html" class="tsd-signature-type" data-tsd-kind="Class">PhysicsBody</a><span class="tsd-signature-symbol">&lt;</span><a href="../modules/index.Duck.html" class="tsd-signature-type" data-tsd-kind="Namespace">Duck</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.html" class="tsd-signature-type" data-tsd-kind="Namespace">Types</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html" class="tsd-signature-type" data-tsd-kind="Namespace">Texture</a><span class="tsd-signature-symbol">.</span><a href="../modules/index.Duck.Types.Texture.html#Type" class="tsd-signature-type" data-tsd-kind="Type alias">Type</a><span class="tsd-signature-symbol">&gt;</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="auto" class="tsd-anchor"></a><h3>auto</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">auto<span class="tsd-signature-symbol">(</span>offset<span class="tsd-signature-symbol">?: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L244">core/physics/models/hitbox.ts:244</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Auto scales, positions, and offsets the Hitbox based on the shape of the PhysicsBody</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> offset: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getBottom" class="tsd-anchor"></a><h3>get<wbr/>Bottom</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Bottom<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L356">core/physics/models/hitbox.ts:356</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the bottom most coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCenter" class="tsd-anchor"></a><h3>get<wbr/>Center</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Center<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L386">core/physics/models/hitbox.ts:386</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the center coordinates of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCenterX" class="tsd-anchor"></a><h3>get<wbr/>CenterX</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>CenterX<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L409">core/physics/models/hitbox.ts:409</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the centerX coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getCenterY" class="tsd-anchor"></a><h3>get<wbr/>CenterY</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>CenterY<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L399">core/physics/models/hitbox.ts:399</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the centerY coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getLeft" class="tsd-anchor"></a><h3>get<wbr/>Left</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Left<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L366">core/physics/models/hitbox.ts:366</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the left most coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getRight" class="tsd-anchor"></a><h3>get<wbr/>Right</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Right<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L376">core/physics/models/hitbox.ts:376</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the right most coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getTop" class="tsd-anchor"></a><h3>get<wbr/>Top</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Top<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L346">core/physics/models/hitbox.ts:346</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Gets the top most coordinate of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="groupIntersectsFaceWith" class="tsd-anchor"></a><h3>group<wbr/>Intersects<wbr/>Face<wbr/>With</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">group<wbr/>Intersects<wbr/>Face<wbr/>With<span class="tsd-signature-symbol">(</span>hitboxes<span class="tsd-signature-symbol">: </span><a href="core_group_group.Group.html" class="tsd-signature-type" data-tsd-kind="Class">Group</a><span class="tsd-signature-symbol">&lt;</span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/index.Duck.Types.Collider.html#CollisionResponseType" class="tsd-signature-type" data-tsd-kind="Type alias">CollisionResponseType</a><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L320">core/physics/models/hitbox.ts:320</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Checks if the Hitbox is intersecting with other Hitboxes and returns the face that is colliding</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>hitboxes: <a href="core_group_group.Group.html" class="tsd-signature-type" data-tsd-kind="Class">Group</a><span class="tsd-signature-symbol">&lt;</span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> | </span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">[]</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Hitboxes to use to test the intersection</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/index.Duck.Types.Collider.html#CollisionResponseType" class="tsd-signature-type" data-tsd-kind="Type alias">CollisionResponseType</a><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="intersectsFaceWith" class="tsd-anchor"></a><h3>intersects<wbr/>Face<wbr/>With</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">intersects<wbr/>Face<wbr/>With<span class="tsd-signature-symbol">(</span>hitbox<span class="tsd-signature-symbol">: </span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/index.Duck.Types.Collider.html#CollisionResponseType" class="tsd-signature-type" data-tsd-kind="Type alias">CollisionResponseType</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L307">core/physics/models/hitbox.ts:307</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Checks if the Hitbox is intersecting with another Hitbox and returns the face that is colliding</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>hitbox: <a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Hitbox to use to test the intersection</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules/index.Duck.Types.Collider.html#CollisionResponseType" class="tsd-signature-type" data-tsd-kind="Type alias">CollisionResponseType</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="intersectsWith" class="tsd-anchor"></a><h3>intersects<wbr/>With</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">intersects<wbr/>With<span class="tsd-signature-symbol">(</span>hitbox<span class="tsd-signature-symbol">: </span><a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L279">core/physics/models/hitbox.ts:279</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Checks if the Hitbox is intersecting with another Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>hitbox: <a href="core_physics_models_hitbox.Hitbox.html" class="tsd-signature-type" data-tsd-kind="Class">Hitbox</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="scale" class="tsd-anchor"></a><h3>scale</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">scale<span class="tsd-signature-symbol">(</span>scale<span class="tsd-signature-symbol">: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L221">core/physics/models/hitbox.ts:221</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Sets the width and height of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>scale: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The new scale of the Hitbox</p> </div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setDebugColor" class="tsd-anchor"></a><h3>set<wbr/>Debug<wbr/>Color</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Debug<wbr/>Color<span class="tsd-signature-symbol">(</span>debugColor<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, visible<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L210">core/physics/models/hitbox.ts:210</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Sets the debugColor and visibility of the Hitbox as a debug aid</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>debugColor: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>Color</p> </div></div></li><li><h5>visible: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="setPosition" class="tsd-anchor"></a><h3>set<wbr/>Position</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">set<wbr/>Position<span class="tsd-signature-symbol">(</span>newPosition<span class="tsd-signature-symbol">: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a>, offset<span class="tsd-signature-symbol">?: </span><a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/ksplatdev/DuckEngine/blob/717462d/src/core/physics/models/hitbox.ts#L233">core/physics/models/hitbox.ts:233</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>memberof</dt><dd><p>Hitbox</p> </dd><dt>description</dt><dd><p>Sets position of the Hitbox</p> </dd><dt>since</dt><dd><p>2.0.0</p> </dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>newPosition: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a></h5><div class="tsd-comment tsd-typography"><div class="lead"> <p>The new position of the Hitbox</p> </div></div></li><li><h5>offset: <a href="core_math_vector2.Vector2.html" class="tsd-signature-type" data-tsd-kind="Class">Vector2</a><span class="tsd-signature-symbol"> = ...</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Modules</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animation.html">core/animation/animation</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationFrame.html">core/animation/animation<wbr/>Frame</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationManager.html">core/animation/animation<wbr/>Manager</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_animationState.html">core/animation/animation<wbr/>State</a></li><li class=" tsd-kind-module"><a href="../modules/core_animation_stateMachine.html">core/animation/state<wbr/>Machine</a></li><li class=" tsd-kind-module"><a href="../modules/core_camera_camera.html">core/camera/camera</a></li><li class=" tsd-kind-module"><a href="../modules/core_cutscene_cutscene.html">core/cutscene/cutscene</a></li><li class=" tsd-kind-module"><a href="../modules/core_debug_debug.html">core/debug/debug</a></li><li class=" tsd-kind-module"><a hr