Documentation

WHAT WE GOT

AABB
Physics Environment

Animation
Actions & Animations

Array
Support Classes

Audio
Sounds & Music

Audio Effect
Sounds & Music

Background Audio
Sounds & Music

Bezier
Actions & Animations

Blink
Actions & Animations

Body
Physics Environment

Callback
Actions & Animations

Chain Shape
Physics Environment

Circle Shape
Physics Environment

Color
Support Classes

Delay
Actions & Animations

Device
Support Classes

Director
Essentials

Ease
Actions & Animations

Edge Shape
Physics Environment

Event
Support Classes

Fade
Actions & Animations

Filter
Physics Environment

Fixture
Physics Environment

Jump
Actions & Animations

Label
User Interface

Layer
Essentials

Layer Color
Essentials

Liquid
Actions & Animations

Mass Data
Physics Environment

Menu
User Interface

Menu Image
User Interface

Menu Label
User Interface

Move
Actions & Animations

Numeric
Support Clases

Object Layer
Tiled Maps

Physics Sprite
Physics Environment

Place
Actions & Animations

Point
Support Classes

Polygon Shape
Physics Environment

Repeat
Actions & Animations

Rotate
Actions & Animations

Scale
Actions & Animations

Scene
Essentials

Screen
Support Classes

Sequence
Actions & Animations

Shape
Physics Environment

Shuffle
Actions & Animations

Size
Support Classes

Skew
Actions & Animations

Spawn
Actions & Animations

Split
Actions & Animations

Sprite
Essentials

Sprite Batch
Essentials

Sprite Frame Cache
Essentials

Tile Layer
Tiled Maps

Tile Map
Tiled Maps

Tile Set
Tiled Maps

Tint
Actions & Animations

Touch
Support Classes

Turn
Actions & Animations

Twirl
Actions & Animations

Visibility
Actions & Animations

Wave
Actions & Animations

Wiggle
Actions & Animations

World
Physics Environment

PHYSICS ENVIRONMENT

Edge Shape

A Subclass of Shape that allows the Physics Environment to simulate single line shapes.

For more information, see: Shape documentation page

Level Up!

Edge Shapes are commonly used for simulating walls.

New

Returns a new instance of the EdgeShape class:

edge_shape = EdgeShape.new start_point: [10, 10], end_point: [20, 20]

Start Point

Retrieves the start point of the EdgeShape:

start_point = edge_shape.start_point

p "The edge shape start point is: #{start_point.x}, #{start_point.y}"

Metric Start Point

Retrieves the start point in Metric Coordinates of the EdgeShape.

End Point

Gets the Edge Shape's end point:

end_point = edge_shape.end_point

p "The edge shape end point is: #{end_point.x}, #{end_point.y}"

Metric End Point

Gets the Edge Shape's end point in Metric Coordinates.

Has Start Adjacent Point?

Returns if the Edge Shape has a start adjacent point:

edge_shape.has_start_adjacent_point?

Start Adjacent Point

Retrieves the Edge Shape's start adjacent point:

start_adjacent_point = edge_shape.start_adjacent_point

p "The start adjacent point is: #{start_adjacent_point.x}, #{start_adjacent_point.y}"

Metric Start Adjacent Point

Gets the Edge Shape's start adjacent point in Metric Coordinates.

Has End Adjacent Point?

Returns if the Edge Shape has a end adjacent point:

edge_shape.has_end_adjacent_point?

End Adjacent Point

Gets the end adjacent point of the EdgeShape:

end_adjacent_point = edge_shape.end_adjacent_point

p "The end adjacent point is: #{end_adjacent_point.x}, #{end_adjacent_point.y}"

Metric End Adjacent Point

Retrieves the end adjacent point of the EdgeShape in Metric Coordinates.