Extended from BaseObject PhysicalObject¶
This class is used to create objects with physics
Properties¶
Vector2 ChromaticAberrationPoint¶
This is the point which is being used as reference for the chromatic aberration
Vector2 Force¶
Is the force which is applied in the moment to the object
Vector2 Velocity¶
Is the velocity applied to the object
table ChromaticAberration¶
The instances which makes the chromatic aberration effect
{ }
table Collisions¶
This table stores all the active collisions
{ }
table CollisionBlacklist¶
This dictionary stores all the blacklisted objects, to blacklist an object do it like this:
CollisionBlacklist[object.Id] = true
{ }
table Hitbox¶
This the CollisionMask of the object
{ }
number Mass¶
The object mass
number HitboxScale¶
number CollisionGroup¶
A number which indicates the collision group of the object, the object only can collide with other objects with the same CollisionGroup
number ChromaticAberrationIntensity¶
number ChromaticAberrationDistance¶
boolean Anchored¶
This property defines if the object should have physics or not
boolean CanCollide¶
This property defines if the object can collide with other objects
boolean IsGrounded¶
This property indicates if the object is touching the ground
boolean TrackCollisions¶
This property defines if the object is going to have physics and collisions or not
boolean ChromaticAberrationConnection¶
Methods¶
PhysicalObject Constructor(
)¶
void Load(url: string
)¶
Loads an image for the current object and is set as the instance image
void SetChromaticAberration(Intensity: number, Distance: number, Point: Vector2
)¶
Sets chromatic aberration for the image using a center as reference, by default the center is the middle of the screen, to disable the chromatic aberration send 0 as first parameter
Events¶
Name |
Description |
---|---|
Collision | Params -> PhysicalObject This event is fired when the object collides with other object |
CollisionEnd | Params -> PhysicalObject This event is fired when the object finish the collision with other object |