<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Maratis forum - Classes in Lua (A little help)]]></title>
		<link>http://forum.maratis3d.com/viewtopic.php?id=743</link>
		<description><![CDATA[The most recent posts in Classes in Lua (A little help).]]></description>
		<lastBuildDate>Mon, 26 Aug 2013 21:42:14 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Classes in Lua (A little help)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4778#p4778</link>
			<description><![CDATA[<div class="quotebox"><cite>anael wrote:</cite><blockquote><p>did you look at this exemple in the wiki ?<br /><a href="http://wiki.maratis3d.org/index.php?title=Lua_object_programming_example">http://wiki.maratis3d.org/index.php?tit &#133; ng_example</a></p><p>I made it to show how to create a class-like object.</p></blockquote></div><br /><p>Hehe. I guess I didn&#039;t read that part. Thank you!!</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Mon, 26 Aug 2013 21:42:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4778#p4778</guid>
		</item>
		<item>
			<title><![CDATA[Re: Classes in Lua (A little help)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4774#p4774</link>
			<description><![CDATA[<p>did you look at this exemple in the wiki ?<br /><a href="http://wiki.maratis3d.org/index.php?title=Lua_object_programming_example">http://wiki.maratis3d.org/index.php?tit &#133; ng_example</a></p><p>I made it to show how to create a class-like object.</p>]]></description>
			<author><![CDATA[dummy@example.com (anael)]]></author>
			<pubDate>Mon, 26 Aug 2013 20:24:45 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4774#p4774</guid>
		</item>
		<item>
			<title><![CDATA[Classes in Lua (A little help)]]></title>
			<link>http://forum.maratis3d.com/viewtopic.php?pid=4735#p4735</link>
			<description><![CDATA[<p>I guess classes aren&#039;t a part of lua, but I found a tutorial on youtube that shows you how to fake it. And it fakes it really well:</p><p><a href="https://www.youtube.com/watch?v=jq58moMWlT8">https://www.youtube.com/watch?v=jq58moMWlT8</a></p><p>But! I modified his example a little, and I need suggestions on how to make it more authentic (If it can be any more authentic):</p><p>--New Person Class<br />function newPerson(name,age)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; local object = {}<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; object.name = name<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; object.age = age<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function object:sayName()<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print (object.name)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end&nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return object<br />end</p><p>--Create Joe<br />local joe = newPerson(&quot;Joe&quot;,24)</p><p>--Create Bill<br />local bill = newPerson(&quot;Bill&quot;,25)</p><p>--Print Joe&#039;s name<br />print (joe.name)</p><p>--Make Bill say his name<br />bill:sayName()</p>]]></description>
			<author><![CDATA[dummy@example.com (Tutorial Doctor)]]></author>
			<pubDate>Fri, 23 Aug 2013 05:56:14 +0000</pubDate>
			<guid>http://forum.maratis3d.com/viewtopic.php?pid=4735#p4735</guid>
		</item>
	</channel>
</rss>
