Class: Yuki::Tilemap::MapData::AnimatedTileCounter

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

Overview

Class managing animated tile counters

Constant Summary collapse

DEFAULT_COUNTERS =

Hash of default AnimatedTileCounters

{}

Class Attribute Summary collapse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(waits) ⇒ AnimatedTileCounter

Create a new animated tile counter

Parameters:

  • waits (Array<Integer>) —

    list of number of frame to wait for each count



1693
1694
# File 'docs/4_Systems_003_Map_Engine.rb', line 1693

def initialize(waits)
end

Class Attribute Details

.last_update_counter_time

Set or get the last update counter time



1704
1705
1706
# File 'docs/4_Systems_003_Map_Engine.rb', line 1704

def last_update_counter_time
  @last_update_counter_time
end

Instance Attribute Details

#count ⇒ Integer (readonly)

Returns:

  • (Integer)


1686
1687
1688
# File 'docs/4_Systems_003_Map_Engine.rb', line 1686

def count
  @count
end

#last_update_time ⇒ Time (readonly)

Returns:

  • (Time)


1690
1691
1692
# File 'docs/4_Systems_003_Map_Engine.rb', line 1690

def last_update_time
  @last_update_time
end

#waits ⇒ Array<Integer> (readonly)

Returns:

  • (Array<Integer>)


1688
1689
1690
# File 'docs/4_Systems_003_Map_Engine.rb', line 1688

def waits
  @waits
end

Class Method Details

.defaults(texture, texture_name) ⇒ Array<AnimatedTileCounter>

Get the default counters for the specified texture

Parameters:

Returns:



1709
1710
# File 'docs/4_Systems_003_Map_Engine.rb', line 1709

def defaults(texture, texture_name)
end

.synchronize_all

Synchronize all the counter based on their wait type



1712
1713
# File 'docs/4_Systems_003_Map_Engine.rb', line 1712

def synchronize_all
end

Instance Method Details

#synchronize(animated_tile)

Synchronize itself with another animated tile

Parameters:



1700
1701
# File 'docs/4_Systems_003_Map_Engine.rb', line 1700

def synchronize(animated_tile)
end

#update

Update the count value



1696
1697
# File 'docs/4_Systems_003_Map_Engine.rb', line 1696

def update
end