Class: ScriptLoader::PSDKConfig::TilemapConfig
- Defined in:
- scripts/00000 PSDK_CONFIG.rb
Overview
Class describing the tilemap configuation
Instance Attribute Summary collapse
-
#autotile_idle_frame_count ⇒ Integer
readonly
Number of frame an autotile wait before being refreshed.
-
#center_x ⇒ Integer
readonly
Player center x value.
-
#center_y ⇒ Intger
readonly
Player center y value.
-
#character_sprite_zoom ⇒ Float
readonly
Zoom of sprite character.
-
#character_tile_zoom ⇒ Float
readonly
Zoom of tiles in sprite character.
-
#maplinker_offset_x ⇒ Integer
readonly
Number of tile in x to make a proper map transition with map linker.
-
#maplinker_offset_y ⇒ Integer
readonly
Number of tile in y to make a proper map transition with map linker.
-
#old_maplinker ⇒ Boolean
readonly
If the game use old maplinker method.
-
#tilemap_class ⇒ String
readonly
Full constant path of the tilemap class (from Object).
-
#tilemap_size_x ⇒ Integer
readonly
Number of tile in x to properly show the tilemap.
-
#tilemap_size_y ⇒ Integer
readonly
Number of tiles in y to properly show the tilemap.
Instance Method Summary collapse
-
#fix_missing_values ⇒ Boolean
Function that fix the missing values.
-
#initialize ⇒ TilemapConfig
constructor
Create a new TilemapConfig.
Constructor Details
#initialize ⇒ TilemapConfig
Create a new TilemapConfig
280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 280 def initialize @tilemap_class = 'Tilemap::WithLessRubySprites_16' @tilemap_size_x = 22 @tilemap_size_y = 17 @character_tile_zoom = 0.5 @character_sprite_zoom = 1 @center_x = (320 - 16) * 4 @center_y = (240 - 16) * 4 @maplinker_offset_x = 10 @maplinker_offset_y = 7 @autotile_idle_frame_count = 6 end |
Instance Attribute Details
#autotile_idle_frame_count ⇒ Integer (readonly)
Returns number of frame an autotile wait before being refreshed.
263 264 265 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 263 def autotile_idle_frame_count @autotile_idle_frame_count end |
#center_x ⇒ Integer (readonly)
Returns player center x value.
269 270 271 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 269 def center_x @center_x end |
#center_y ⇒ Intger (readonly)
Returns player center y value.
271 272 273 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 271 def center_y @center_y end |
#character_sprite_zoom ⇒ Float (readonly)
Returns zoom of sprite character.
267 268 269 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 267 def character_sprite_zoom @character_sprite_zoom end |
#character_tile_zoom ⇒ Float (readonly)
Returns zoom of tiles in sprite character.
265 266 267 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 265 def character_tile_zoom @character_tile_zoom end |
#maplinker_offset_x ⇒ Integer (readonly)
Returns number of tile in x to make a proper map transition with map linker.
273 274 275 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 273 def maplinker_offset_x @maplinker_offset_x end |
#maplinker_offset_y ⇒ Integer (readonly)
Returns number of tile in y to make a proper map transition with map linker.
275 276 277 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 275 def maplinker_offset_y @maplinker_offset_y end |
#old_maplinker ⇒ Boolean (readonly)
Returns if the game use old maplinker method.
277 278 279 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 277 def old_maplinker @old_maplinker end |
#tilemap_class ⇒ String (readonly)
Returns full constant path of the tilemap class (from Object).
257 258 259 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 257 def tilemap_class @tilemap_class end |
#tilemap_size_x ⇒ Integer (readonly)
Returns number of tile in x to properly show the tilemap.
259 260 261 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 259 def tilemap_size_x @tilemap_size_x end |
#tilemap_size_y ⇒ Integer (readonly)
Returns number of tiles in y to properly show the tilemap.
261 262 263 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 261 def tilemap_size_y @tilemap_size_y end |
Instance Method Details
#fix_missing_values ⇒ Boolean
Function that fix the missing values
295 296 297 298 299 |
# File 'scripts/00000 PSDK_CONFIG.rb', line 295 def fix_missing_values need_save = false need_save ||= @character_sprite_zoom != (@character_sprite_zoom ||= 1) return ARGV.include?('debug') && need_save end |