DGS OOP Class: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 11: Line 11:
...
...
}
}
*'''The built-in functions are non-modifiable'''
</syntaxhighlight>
</syntaxhighlight>


==Start==
==Start==
Instead of using
Instead of using

Revision as of 07:32, 15 November 2018

DGS provides not only POP ( Procedure Oriented Programming ) but also OOP ( Object Oriented Programming ). This page introduces OOP of dgs.

Structure

When using DGS OOP, DGS objects being operated are no longer elements, instead, they will be tables ( table is the only type whose call methods can be defined in lua ) . Here is the structure of DGS OOP Object:

DGSDxObject = {
	DGSElement = DGSElement -- The actual dgs element
	function1,
	function2,
	...
}
*'''The built-in functions are non-modifiable'''

Start

Instead of using