Class: RPG::Event

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

Defined Under Namespace

Classes: Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(x, y) ⇒ Event


21
22
23
24
25
26
27
# File 'lib/rpg/event.rb', line 21

def initialize(x, y)
  @id = 0
  @name = ""
  @x = x
  @y = y
  @pages = [RPG::Event::Page.new]
end

Instance Attribute Details

#idObject

The event ID.


6
7
8
# File 'lib/rpg/event.rb', line 6

def id
  @id
end

#nameObject

The event name.


9
10
11
# File 'lib/rpg/event.rb', line 9

def name
  @name
end

#pagesArray<RPG::Event::Page>

The Events pages. An Page array.


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

def pages
  @pages
end

#xObject

The event's X-coordinate on the map.


12
13
14
# File 'lib/rpg/event.rb', line 12

def x
  @x
end

#yObject

The event's Y-coordinate on the map.


15
16
17
# File 'lib/rpg/event.rb', line 15

def y
  @y
end