Class: RPG::CommonEvent
- Inherits:
-
Object
- Object
- RPG::CommonEvent
- Defined in:
- lib/rpg/common_event.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#list ⇒ Object
Returns the value of attribute list.
-
#name ⇒ Object
Returns the value of attribute name.
-
#switch_id ⇒ Object
Returns the value of attribute switch_id.
-
#trigger ⇒ Object
Returns the value of attribute trigger.
Instance Method Summary collapse
- #autorun? ⇒ Boolean
-
#initialize ⇒ CommonEvent
constructor
A new instance of CommonEvent.
- #parallel? ⇒ Boolean
Constructor Details
#initialize ⇒ CommonEvent
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
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/rpg/common_event.rb', line 16 def id @id end |
#list ⇒ Object
Returns the value of attribute list.
20 21 22 |
# File 'lib/rpg/common_event.rb', line 20 def list @list end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rpg/common_event.rb', line 17 def name @name end |
#switch_id ⇒ Object
Returns the value of attribute switch_id.
19 20 21 |
# File 'lib/rpg/common_event.rb', line 19 def switch_id @switch_id end |
#trigger ⇒ Object
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
10 11 12 |
# File 'lib/rpg/common_event.rb', line 10 def autorun? @trigger == 1 end |
#parallel? ⇒ Boolean
13 14 15 |
# File 'lib/rpg/common_event.rb', line 13 def parallel? @trigger == 2 end |