Template:OOP ZH-CN: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><u>'''OOP 语法'''</u> <small>[[OOP Introduction|什么是OOP?]]</small> | <includeonly><u>'''OOP 语法'''</u> <small>[[OOP Introduction|什么是OOP?]]</small> | ||
{{#if: {{{1|}}} |: '''提示''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''方法''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''变量''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''对称函数''': ''[[{{{4}}}]]''|}}</includeonly><noinclude>{{Template | {{#if: {{{1|}}} |: '''提示''': ''{{{1}}}''|}}{{#if: {{{2|}}} |: '''方法''': ''{{{2}}}(...)''|}}{{#if: {{{3|}}} |: '''变量''': ''.{{{3}}}''|}}{{#if: {{{4|}}} |: '''对称函数''': ''[[{{{4}}}]]''|}}</includeonly><noinclude>{{Template | ||
Hey guys, here are a few "rules" in using the OOP template: | Hey guys, here are a few "rules" in using the OOP template: | ||
* If it's a constructor, such as [[createPed]], use "[[Ped]]" not "createPed" or "Ped.create" | * If it's a constructor, such as [[createPed]], use "[[Ped]]" not "createPed" or "Ped.create" |
Revision as of 04:56, 3 February 2021
{{Template Hey guys, here are a few "rules" in using the OOP template:
- If it's a constructor, such as createPed, use "Ped" not "createPed" or "Ped.create"
- If it's a static class function or a constructor, use a capital letter for the first character. (Player not player).
- Likewise, if it's an object function such as "player:setName", use lowercase.
- Use full stops (or if you're american, "periods.") for static functions and colons (:) for object functions.
}}