Class: RPG::Troop::Member

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/troop.rb

Overview

Data class for troop members.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMember

Returns a new instance of Member


28
29
30
31
32
33
34
# File 'lib/rpg/troop.rb', line 28

def initialize
  @enemy_id = 1
  @x = 0
  @y = 0
  @hidden = false
  @immortal = false
end

Instance Attribute Details

#enemy_idObject

The enemy ID.


37
38
39
# File 'lib/rpg/troop.rb', line 37

def enemy_id
  @enemy_id
end

#hiddenObject

Truth value of the [Appear Midway] option.


46
47
48
# File 'lib/rpg/troop.rb', line 46

def hidden
  @hidden
end

#immortalObject

Truth value of the [Immortal] option.


49
50
51
# File 'lib/rpg/troop.rb', line 49

def immortal
  @immortal
end

#xObject

The troop member's X-coordinate.


40
41
42
# File 'lib/rpg/troop.rb', line 40

def x
  @x
end

#yObject

The troop member's Y-coordinate.


43
44
45
# File 'lib/rpg/troop.rb', line 43

def y
  @y
end