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

- (CommonEvent) initialize

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

- (Object) id

Returns the value of attribute id



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

def id
  @id
end

- (Object) list

Returns the value of attribute list



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

def list
  @list
end

- (Object) name

Returns the value of attribute name



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

def name
  @name
end

- (Object) switch_id

Returns the value of attribute switch_id



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

def switch_id
  @switch_id
end

- (Object) trigger

Returns the value of attribute trigger



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

def trigger
  @trigger
end

Instance Method Details

- (Boolean) autorun?

Returns:

  • (Boolean)


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

def autorun?
  @trigger == 1
end

- (Boolean) parallel?

Returns:

  • (Boolean)


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

def parallel?
  @trigger == 2
end