11 Circle
.style
= "outline" --can be "outline", "filled", or "both"
12 Circle
.fcolor
= false --set to true to have the filled circle use a different color
19 function Circle
:new(o
)
26 --updates the object's state
27 function Circle
:update(delta
)
28 Object
.update(self
, delta
)
31 --default draw routine
32 function Circle
:draw()
33 if(self
.style
== "filled" or self
.style
== "both") then
34 if(self
.fcolor
== true) then
35 draw_filled_circle(self
.x
, self
.y
, self
.radius
, self
.fr
, self
.fg
, self
.fb
, self
.fa
, self
.rotation
, self
.scale_x
, self
.scale_y
)
37 draw_filled_circle(self
.x
, self
.y
, self
.radius
, self
.r
, self
.g
, self
.b
, self
.a
, self
.rotation
, self
.scale_x
, self
.scale_y
)
41 if(self
.style
== "outline" or self
.style
== "both") then
42 draw_circle(self
.x
, self
.y
, self
.radius
, self
.r
, self
.g
, self
.b
, self
.a
, self
.rotation
, self
.scale_x
, self
.scale_y
)
46 --there is no predefined collision behavior
47 -- "ids" is the list of Rect ids that have been collided with
48 -- "type" is the type of the Object that is colliding
49 function Circle
:collide(type, ids
)