bytepath/obj/Circle.lua
2025-11-10 01:02:09 -03:00

21 lines
558 B
Lua

---@class Circle:Object circle object
---@field x number horizontal position of circle
---@field y number vertical position of circle
---@field radius number radius of circle
---@field mode string drawing mode of circle
local Circle = Object:extend()
function Circle:new(config)
self.x = config.x or 400
self.y = config.y or 300
self.radius = config.radius or 50
self.mode = config.mode or "fill"
end
function Circle:update(dt) end
function Circle:draw()
love.graphics.circle(self.mode, self.x, self.y, self.radius)
end
return Circle