-
Notifications
You must be signed in to change notification settings - Fork 11
Shadow
local CircleShadow = require("shadows.ShadowShapes.CircleShadow")
local PolygonShadow = require("shadows.ShadowShapes.PolygonShadow")
CircleShadow circleShadow = CircleShadow:new(Body Body, number x, number y, number Radius)
Description: Creates a circle shape.
PolygonShadow polygonShadow = PolygonShadow:new(Body Body, ...)
Description: Creates a polygon shape.
local newWorld = World:new()
local newBody = Body:new(newWorld)
local newCircleShadow = CircleShadow:new(newBody, 0, 0, 64)
local newPolygonhadow = PolygonShadow:new(newBody, 0, 0, 10, 0, 10, 10, 0, 10)
Shape:Remove()
Description: Removes a shape.
CircleShadow:SetRadius(number Radius)
Description: Changes the radius of a circle shape.
number Radius = CircleShadow:GetRadius()
Description: Gets the radius of a circle shape.
CircleShadow:SetPosition(number x, number y)
Description: Changes the position of the circle shape.
number x, number y = CircleShadow:GetPosition()
Description: Gets the position of the circle shape.
PolygonShadow:SetVertices(...)
Description: Changes the vertices of the polygon shape.
table Vertices = PolygonShadow:GetVertices()
Description: Gets the vertices of the polygon shape.