Class: PFM::MapOverlay::UVResolver

Inherits:
Object
  • Object
show all
Defined in:
docs/4_Systems_952_MapOverlay.rb

Overview

Class responsive of resolving target uv coordinates for the shaders used in MapOverlay

Instance Method Summary collapse

Constructor Details

#initialize(source_coordinates, coordinate_type = :tile) ⇒ UVResolver

Note:

(:game_player for player's coordinates, array for custom coordinates)

Create a new UVResolver

Parameters:

  • source_coordinates (Array<Integer>, Symbol)
  • coordinate_type (Symbol) (defaults to: :tile) —

    Must be :tile (defined for later uses)



369
370
# File 'docs/4_Systems_952_MapOverlay.rb', line 369

def initialize(source_coordinates, coordinate_type = :tile)
end

Instance Method Details

#resolve(screen_size, origin) ⇒ Array<Float>

Resolve the uv coordinates

Parameters:

  • screen_size (Array<Float>) —

    size of the screen

  • origin (Object) —

    object allowing the find the origin of the screen in its own coordinate space

Returns:

  • (Array<Float>)


375
376
# File 'docs/4_Systems_952_MapOverlay.rb', line 375

def resolve(screen_size, origin)
end