Changes between Initial Version and Version 1 of Ticket #1425, comment 6


Ignore:
Timestamp:
Jan 2, 2013, 5:07:17 PM (11 years ago)
Author:
zoot

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1425, comment 6

    initial v1  
    11Replying to [comment:5 quantumstate]:
    22
    3 > You should use a getter to find the state from the !BattleDetection  component.  This is the convention that we use and it makes it more flexible if someone wants to do some calculation when the state is asked for.
     3> You should use a getter to find the state from the !BattleDetection   component.  This is the convention that we use and it makes it more flexible if someone wants to do some calculation when the state is asked for.
    44
    55What is meant by getter here? Can you point to an example of how this is usually done?
     
    77> Why did you change the Armour component instead of the Health component when adding the state.damage = total; property?
    88
    9 I figured the Reduce function in the Health component is not just damage dealing - it could be used for other types of health reduction too. The !TakeDamage function, on the other hand, is specifically for applying damage.
     9I figured the Reduce function in the Health component is not just for damage dealing - it could be used for other types of health reduction too. The !TakeDamage function, on the other hand, is specifically for applying damage.
    1010
    11 > !BattleDetection .prototype.!OnGlobalAttacked  is defined twice.  The second version should be kept.
     11> !BattleDetection  .prototype.!OnGlobalAttacked   is defined twice.  The second version should be kept.
    1212
    1313[https://github.com/zootzoot/0ad/commit/99a1a8278b1b8e98f5ba3219361b91fa6132d961 Done].