Lua: "class"
Vhelium
Join Date: 2012-11-24 Member: 173049Members
Hi everyone,
as a budding developper I wanted to use the potential of this fantastic game to create mods for it.
I'm very fimilar with C# and Java and also used Lua for some simple projects.
When I looked through the code I saw in nearly every file the definition of a class like "class 'ARC' (ScriptActor)".
I have never seen this kind of class definition in Lua and I also didnt find anything like this on the internet.
Can someone explain me, how this exactly works?
Thanks.
Greetings,
Vhelium
as a budding developper I wanted to use the potential of this fantastic game to create mods for it.
I'm very fimilar with C# and Java and also used Lua for some simple projects.
When I looked through the code I saw in nearly every file the definition of a class like "class 'ARC' (ScriptActor)".
I have never seen this kind of class definition in Lua and I also didnt find anything like this on the internet.
Can someone explain me, how this exactly works?
Thanks.
Greetings,
Vhelium
Comments
<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->public class ARC : ScriptActor<!--c2--></div><!--ec2-->
You should watch Brian's talk on NS2's lua code here:
<a href="http://www.twitch.tv/naturalselection2/b/341658557" target="_blank">http://www.twitch.tv/naturalselection2/b/341658557</a> Starts at 11:20
Thank you guys for the help.
I thought it must be like that, but I was confused because I have never seen it in Lua before.
Also thanks for the link.
Vhelium