Class: SDC::Hitshape

Inherits:
Actionshape show all
Defined in:
lib/core/ActionShape.rb

Overview

Hitshapes are shapes which are able to inflict damage or other conditions

Instance Attribute Summary collapse

Attributes inherited from Actionshape

#active, #attributes, #shape_index

Instance Method Summary collapse

Methods inherited from Actionshape

#initialize_copy

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

#damageObject

Returns the value of attribute damage.



28
29
30
# File 'lib/core/ActionShape.rb', line 28

def damage
  @damage
end