Functions in Haxe

46 views
Skip to first unread message

Gabe Brooks

unread,
Mar 28, 2014, 9:29:29 PM3/28/14
to haxe...@googlegroups.com
Hey Guys,

I'm new to Haxe, and have used a lot of JS and Lua in the past.
I know the answer to this is probably ridiculously simple, but like I said, I'm new to Haxe...
How do you (if you can) make a function that you can call later on?

Thanks in advance,
Gabe
Message has been deleted

Mike Welsh

unread,
Mar 28, 2014, 10:03:37 PM3/28/14
to haxe...@googlegroups.com
Hi Gabe,

It works similarly to JS. You can define functions in a class, that you can then call later, like this:

You can also declare anonymous functions, and store references to them to call later:

Hope this helps.
Reply all
Reply to author
Forward
0 new messages