Template:CD
Izvor: Valve Developer Community
Prijeđi na navigaciju
Prijeđi na pretraživanje
Stranica s dokumentacijom Template:CD/doc/hr ne postoji.
Umjesto toga bit će prikazana engleska dokumentacija koju možete prevesti pomoću Google Prevoditelja (ili sličnog softvera). Ako nakon ove poruke nema ničega, najvjerojatnije dokumentacija ne postoji niti na engleskom jeziku.
Umjesto toga bit će prikazana engleska dokumentacija koju možete prevesti pomoću Google Prevoditelja (ili sličnog softvera). Ako nakon ove poruke nema ničega, najvjerojatnije dokumentacija ne postoji niti na engleskom jeziku.
This template is used to generate class hierarchy for an entity.
Usage
{{CD|<entity_class>|file1=<file_where_the_class_is_defined_in>}}
- {{{1}}} - <entity_class>, using ??? will add hidden Category:Unknown Classname to the page.
- If {{{file1}}} param is specified there will be a lookup using the classname specified in {{{1}}} into Template:CD/classlink (lookup fallbacks into Template:CD/classlink/asw) to automatically link to Valve Source SDK 2013 githup repo (multiplayer files are linked).
- {{{goldsrc}}} - should be used instead of {{{file1}}} when adding class hierarchy for GoldSrc entities. It adds '
(GoldSrc)' to all links and the lookup for file link will use Template:CD/classlink/hl.
- {{{base}}} can be specified to explicitly choose the superclass which can be useful in case there isn't the desired class in Template:CD/superclass or it is defined there but it's already used for something else.
Examples and Parameters
| {{CD|CGasCan|file1=somefile.cpp}} |
| |||
| {{CD|CPhysicsProp|file1=1}} |
| |||
| {{CD|???|base=CDynamicProp}} |
|
Template performance
CD2 repeatedly calls Template:CD/superclass to build the hierarchy
CD calls that once and then builds the rest from smaller defined templates like Template:CD CPointEntity
specifying the base parameter avoids the first Template:CD/superclass call which makes it stuff even faster
Tests:
{{CD2|Hunter}} CPU time: ~0.26s
{{CD|Hunter}} CPU time: ~0.1s
{{CD|Hunter|base=BossZombiePlayerBot}} CPU time: ~0.03s
|
See Also
- List of Source SDK 2013 Entities
- List of Alien Swarm: Reactive Drop Entities
- {{code class}}, which this template deprecates
Skrivena kategorija: