Class: Configs::Project::Display::TilemapSettings
- Defined in:
- scripts/00021 ProjectConfig.rb
Overview
Data class describing Tilemap configuration
Instance Attribute Summary collapse
-
#autotile_idle_frame_count ⇒ Integer
readonly
Get the number of frame autotiles does not animate.
-
#center ⇒ Point
readonly
Get the center of the screen in sub pixel size.
-
#character_sprite_zoom ⇒ Float
readonly
Get the zoom of the sprite as character.
-
#character_tile_zoom ⇒ Float
readonly
Get the zoom of the tiles as character.
-
#map_linker_offset ⇒ Point
readonly
Get the map linker offset.
-
#tilemap_class ⇒ String
readonly
Get the tilemap class.
-
#tilemap_size ⇒ Point
readonly
Get the size of the tilemap.
-
#uses_old_map_linker ⇒ Boolean
readonly
Tell if the game uses the old map linker settings.
Instance Method Summary collapse
-
#initialize(v) ⇒ TilemapSettings
constructor
A new instance of TilemapSettings.
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_count ⇒ Integer (readonly)
Get the number of frame autotiles does not animate
65 66 67 |
# File 'scripts/00021 ProjectConfig.rb', line 65 def autotile_idle_frame_count @autotile_idle_frame_count end |
#center ⇒ Point (readonly)
Get the center of the screen in sub pixel size
77 78 79 |
# File 'scripts/00021 ProjectConfig.rb', line 77 def center @center end |
#character_sprite_zoom ⇒ Float (readonly)
Get the zoom of the sprite as character
73 74 75 |
# File 'scripts/00021 ProjectConfig.rb', line 73 def character_sprite_zoom @character_sprite_zoom end |
#character_tile_zoom ⇒ Float (readonly)
Get the zoom of the tiles as character
69 70 71 |
# File 'scripts/00021 ProjectConfig.rb', line 69 def character_tile_zoom @character_tile_zoom end |
#map_linker_offset ⇒ Point (readonly)
Get the map linker offset
81 82 83 |
# File 'scripts/00021 ProjectConfig.rb', line 81 def map_linker_offset @map_linker_offset end |
#tilemap_class ⇒ String (readonly)
Get the tilemap class
57 58 59 |
# File 'scripts/00021 ProjectConfig.rb', line 57 def tilemap_class @tilemap_class end |
#tilemap_size ⇒ Point (readonly)
Get the size of the tilemap
61 62 63 |
# File 'scripts/00021 ProjectConfig.rb', line 61 def tilemap_size @tilemap_size end |
#uses_old_map_linker ⇒ Boolean (readonly)
Tell if the game uses the old map linker settings
85 86 87 |
# File 'scripts/00021 ProjectConfig.rb', line 85 def uses_old_map_linker @uses_old_map_linker end |