Class: SDC::Hitshape
- Inherits:
-
Actionshape
- Object
- Actionshape
- SDC::Hitshape
- Defined in:
- lib/core/ActionShape.rb
Overview
Hitshapes are shapes which are able to inflict damage or other conditions
Instance Attribute Summary collapse
-
#damage ⇒ Object
Returns the value of attribute damage.
Attributes inherited from Actionshape
#active, #attributes, #shape_index
Instance Method Summary collapse
-
#initialize(active: true, shape_index: nil, damage: 0, attributes: {}) ⇒ Hitshape
constructor
A new instance of Hitshape.
Methods inherited from Actionshape
Constructor Details
#initialize(active: true, shape_index: nil, damage: 0, attributes: {}) ⇒ Hitshape
Returns a new instance of Hitshape.
30 31 32 33 |
# File 'lib/core/ActionShape.rb', line 30 def initialize(active: true, shape_index: nil, damage: 0, attributes: {}) super(active: active, shape_index: shape_index, attributes: attributes) @damage = damage end |
Instance Attribute Details
#damage ⇒ Object
Returns the value of attribute damage.
28 29 30 |
# File 'lib/core/ActionShape.rb', line 28 def damage @damage end |