5 Ellipse
.type = "Ellipse"
12 Ellipse
.style
= "outline" --can be "outline", "filled", or "both"
13 Ellipse
.fcolor
= false --set to true to have the filled circle use a different color
20 function Ellipse
:new(o
)
27 --updates the object's state
28 function Ellipse
:update(delta
)
29 Object
.update(self
, delta
)
32 --default draw routine
33 function Ellipse
:draw()
34 if(self
.style
== "filled" or self
.style
== "both") then
35 if(self
.fcolor
== true) then
36 draw_filled_ellipse(self
.x
, self
.y
, self
.radius_x
, self
.radius_y
, self
.fr
, self
.fg
, self
.fb
, self
.fa
, self
.rotation
, self
.scale_x
, self
.scale_y
)
38 draw_filled_ellipse(self
.x
, self
.y
, self
.radius_x
, self
.radius_y
, self
.r
, self
.g
, self
.b
, self
.a
, self
.rotation
, self
.scale_x
, self
.scale_y
)
42 if(self
.style
== "outline" or self
.style
== "both") then
43 draw_ellipse(self
.x
, self
.y
, self
.radius_x
, self
.radius_y
, self
.r
, self
.g
, self
.b
, self
.a
, self
.rotation
, self
.scale_x
, self
.scale_y
)
47 --there is no predefined collision behavior
48 -- "ids" is the list of Rect ids that have been collided with
49 -- "type" is the type of the Object that is colliding
50 function Ellipse
:collide(type, ids
)