Class: RPG::Weather

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

Overview

Class that display weather

Constant Summary collapse

SunnyTone =

Tone used to simulate the sun weather

Tone.new(90, 50, 0, 40)
INIT_TEXTURE =

Array containing all the texture initializer in the order of the type

%i[init_rain init_rain init_zenith init_sand_storm init_snow init_fog]
UPDATE_METHODS =

Array containing all the weather update methods in the order of the type

%i[update_rain update_rain update_zenith update_sandstorm update_snow update_fog]
SET_TYPE_METHODS =

Methods symbols telling how to set the new type of weather according to the index

[]
SET_TYPE_PSDK_MANAGED =

Boolean telling if the set_type is managed by PSDK or not

[]
MAX_SPRITE =

Number of sprite to generate

61
MAX_TOP =

Top factor of the max= adjustment (max * top / bottom)

3
MAX_BOTTOM =

Bottom factor of the max= adjustment (max * top / bottom)

2

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(viewport = nil) ⇒ Weather

Note:

: type 0 = None, 1 = Rain, 2 = Sun/Zenith, 3 = Darud Sandstorm, 4 = Hail, 5 = Foggy

Create the Weather object

Parameters:

  • viewport (Viewport) (defaults to: nil)


1762
1763
# File 'docs/4_Systems_003_Map_Engine.rb', line 1762

def initialize(viewport = nil)
end

Instance Attribute Details

#maxInteger

Return the max amount of sprites

Returns:

  • (Integer)


1752
1753
1754
# File 'docs/4_Systems_003_Map_Engine.rb', line 1752

def max
  @max
end

#oxNumeric

Return the origin x

Returns:

  • (Numeric)


1755
1756
1757
# File 'docs/4_Systems_003_Map_Engine.rb', line 1755

def ox
  @ox
end

#oyNumeric

Return the origin y

Returns:

  • (Numeric)


1758
1759
1760
# File 'docs/4_Systems_003_Map_Engine.rb', line 1758

def oy
  @oy
end

#typeInteger

Return the weather type

Returns:

  • (Integer)


1749
1750
1751
# File 'docs/4_Systems_003_Map_Engine.rb', line 1749

def type
  @type
end

Class Method Details

.register_set_type(type, symbol, psdk_managed)

Register a new type= method call

Parameters:

  • type (Integer)

    the type of weather

  • symbol (Symbol)

    if the name of the method to call

  • psdk_managed (Boolean)

    if it’s managed by PSDK (some specific code in the type= method)



1848
1849
# File 'docs/4_Systems_003_Map_Engine.rb', line 1848

def register_set_type(type, symbol, psdk_managed)
end

Instance Method Details

#dispose

Dispose the interface



1768
1769
# File 'docs/4_Systems_003_Map_Engine.rb', line 1768

def dispose
end

#update

Update the sprite display



1765
1766
# File 'docs/4_Systems_003_Map_Engine.rb', line 1765

def update
end