Class: Configs::Project::Display::TilemapSettings

Inherits:
Object
  • Object
show all
Defined in:
scripts/00021 ProjectConfig.rb

Overview

Data class describing Tilemap configuration

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(v) ⇒ TilemapSettings

Returns a new instance of TilemapSettings.



87
88
89
90
91
92
93
94
95
96
# File 'scripts/00021 ProjectConfig.rb', line 87

def initialize(v)
  @tilemap_class = v[:tilemapClass]
  @tilemap_size = Point.new(v[:tilemapSize][:x], v[:tilemapSize][:y])
  @autotile_idle_frame_count = v[:autotileIdleFrameCount]
  @character_tile_zoom = v[:characterTileZoom]
  @character_sprite_zoom = v[:characterSpriteZoom]
  @center = Point.new(v[:center][:x], v[:center][:y])
  @map_linker_offset = Point.new(v[:maplinkerOffset][:x], v[:maplinkerOffset][:y])
  @uses_old_map_linker = v[:isOldMaplinker]
end

Instance Attribute Details

#autotile_idle_frame_countInteger (readonly)

Get the number of frame autotiles does not animate

Returns:



65
66
67
# File 'scripts/00021 ProjectConfig.rb', line 65

def autotile_idle_frame_count
  @autotile_idle_frame_count
end

#centerPoint (readonly)

Get the center of the screen in sub pixel size

Returns:



77
78
79
# File 'scripts/00021 ProjectConfig.rb', line 77

def center
  @center
end

#character_sprite_zoomFloat (readonly)

Get the zoom of the sprite as character

Returns:

  • (Float)


73
74
75
# File 'scripts/00021 ProjectConfig.rb', line 73

def character_sprite_zoom
  @character_sprite_zoom
end

#character_tile_zoomFloat (readonly)

Get the zoom of the tiles as character

Returns:

  • (Float)


69
70
71
# File 'scripts/00021 ProjectConfig.rb', line 69

def character_tile_zoom
  @character_tile_zoom
end

#map_linker_offsetPoint (readonly)

Get the map linker offset

Returns:



81
82
83
# File 'scripts/00021 ProjectConfig.rb', line 81

def map_linker_offset
  @map_linker_offset
end

#tilemap_classString (readonly)

Get the tilemap class

Returns:



57
58
59
# File 'scripts/00021 ProjectConfig.rb', line 57

def tilemap_class
  @tilemap_class
end

#tilemap_sizePoint (readonly)

Get the size of the tilemap

Returns:



61
62
63
# File 'scripts/00021 ProjectConfig.rb', line 61

def tilemap_size
  @tilemap_size
end

#uses_old_map_linkerBoolean (readonly)

Tell if the game uses the old map linker settings

Returns:

  • (Boolean)


85
86
87
# File 'scripts/00021 ProjectConfig.rb', line 85

def uses_old_map_linker
  @uses_old_map_linker
end