DGS OOP Class: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
DGS provides not only POP ( Procedure Oriented Programming ) but also [[OOP]] ( Object Oriented Programming ). This page introduces [[OOP]] of dgs. | 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: | |||
<syntaxhighlight lang="lua"> | |||
DGSDxObject = { | |||
DGSElement = DGSElement -- The actual dgs element | |||
function1, | |||
function2, | |||
... | |||
} | |||
</syntaxhighlight> | |||
==Start== | |||
Instead of using |
Revision as of 07:31, 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, ... }
Start
Instead of using