Hi. I have a “circle.hx” class. I have functions that manage the movement time of each circle (import openfl.utils.Timer; Openfl.events.TimerEvent import; import openfl.utils.Timer;). I need in my main.hx class to call to these functions. How can I do?
You would need an instance of a circle in your main class
var myCircle:Circle = new Circle();
The movement functions should be public so you can do
myCircle.someFunction();
Does your circles class extend Sprite ?
Yes. Thanks. But I need to make collision in main.hx between a object in circle.hx and someone else in rect.hx. In main.hx I have 2 object : a circle and a rect object.
If you have the objects just call the functions I don’t see where the problem is.
As to which functions well you coded it so I’m guessing you know.
If this is more of a design question for collision you would pass one of the object to the other:
myCircle.collideWithRect(myRect):Bool