Difference between revisions of "User:AVS/Spellcasting"
From VCMI Project Wiki
< User:AVS
(Created page with "== Common interface == Used by GUI, AI, (?) Server == GUI related interface == used by GUI * animation * sound * description for spellbook * icon for spellbook, scroll etc. ...") |
(→Common interface) |
||
Line 1: | Line 1: | ||
== Common interface == | == Common interface == | ||
− | Used by GUI, AI, (?) Server | + | Used by GUI, AI, (?) Server. Readonly. |
+ | |||
+ | === Service-oriented design version === | ||
+ | |||
+ | Use singleton Handler and methods accepion TSpell as first parameter. | ||
+ | |||
+ | * (+) script-frendly | ||
+ | * (+) low coupling | ||
+ | |||
+ | === OO design version with proxy === | ||
+ | |||
+ | # CSpellInfo - proxy class. Constructs from TSpell. | ||
+ | |||
+ | * (+) more readable | ||
+ | * (+) low coupling | ||
+ | |||
+ | === OO design version === | ||
+ | |||
+ | # CSpell - | ||
+ | # CSpellHandler | ||
+ | |||
+ | * (+) current version | ||
+ | * (-) higher coupling | ||
== GUI related interface == | == GUI related interface == |
Revision as of 08:21, 17 January 2013
Contents
Common interface
Used by GUI, AI, (?) Server. Readonly.
Service-oriented design version
Use singleton Handler and methods accepion TSpell as first parameter.
- (+) script-frendly
- (+) low coupling
OO design version with proxy
- CSpellInfo - proxy class. Constructs from TSpell.
- (+) more readable
- (+) low coupling
OO design version
- CSpell -
- CSpellHandler
- (+) current version
- (-) higher coupling
used by GUI
- animation
- sound
- description for spellbook
- icon for spellbook, scroll etc.
Server interface
used by server-side handlers
- applying effects
- do damage
- set timed effects
- adv map logic