Changes between Initial Version and Version 1 of Ticket #1425, comment 6
- Timestamp:
- Jan 2, 2013, 5:07:17 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #1425, comment 6
initial v1 1 1 Replying to [comment:5 quantumstate]: 2 2 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. 4 4 5 5 What is meant by getter here? Can you point to an example of how this is usually done? … … 7 7 > Why did you change the Armour component instead of the Health component when adding the state.damage = total; property? 8 8 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.9 I 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. 10 10 11 > !BattleDetection .prototype.!OnGlobalAttackedis defined twice. The second version should be kept.11 > !BattleDetection .prototype.!OnGlobalAttacked is defined twice. The second version should be kept. 12 12 13 13 [https://github.com/zootzoot/0ad/commit/99a1a8278b1b8e98f5ba3219361b91fa6132d961 Done].