Class: RPG::CommonEvent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommonEvent

Returns a new instance of CommonEvent.



3
4
5
6
7
8
9
# File 'lib/rpg/common_event.rb', line 3

def initialize
  @id = 0
  @name = ''
  @trigger = 0
  @switch_id = 1
  @list = [RPG::EventCommand.new]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/rpg/common_event.rb', line 16

def id
  @id
end

#listObject

Returns the value of attribute list.



20
21
22
# File 'lib/rpg/common_event.rb', line 20

def list
  @list
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/rpg/common_event.rb', line 17

def name
  @name
end

#switch_idObject

Returns the value of attribute switch_id.



19
20
21
# File 'lib/rpg/common_event.rb', line 19

def switch_id
  @switch_id
end

#triggerObject

Returns the value of attribute trigger.



18
19
20
# File 'lib/rpg/common_event.rb', line 18

def trigger
  @trigger
end

Instance Method Details

#autorun?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/rpg/common_event.rb', line 10

def autorun?
  @trigger == 1
end

#parallel?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/rpg/common_event.rb', line 13

def parallel?
  @trigger == 2
end