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

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

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



1503
1504
# File 'docs/4_Systems_003_Map_Engine.rb', line 1503

def initialize(waits)
end

Class Attribute Details

.last_update_counter_time

Set or get the last update counter time



1514
1515
1516
# File 'docs/4_Systems_003_Map_Engine.rb', line 1514

def last_update_counter_time
  @last_update_counter_time
end

Instance Attribute Details

#countInteger (readonly)

Returns:

  • (Integer)


1496
1497
1498
# File 'docs/4_Systems_003_Map_Engine.rb', line 1496

def count
  @count
end

#last_update_timeTime (readonly)

Returns:

  • (Time)


1500
1501
1502
# File 'docs/4_Systems_003_Map_Engine.rb', line 1500

def last_update_time
  @last_update_time
end

#waitsArray<Integer> (readonly)

Returns:

  • (Array<Integer>)


1498
1499
1500
# File 'docs/4_Systems_003_Map_Engine.rb', line 1498

def waits
  @waits
end

Class Method Details

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

Get the default counters for the specified texture

Parameters:

Returns:



1519
1520
# File 'docs/4_Systems_003_Map_Engine.rb', line 1519

def defaults(texture, texture_name)
end

.synchronize_all

Synchronize all the counter based on their wait type



1522
1523
# File 'docs/4_Systems_003_Map_Engine.rb', line 1522

def synchronize_all
end

Instance Method Details

#synchronize(animated_tile)

Synchronize itself with another animated tile

Parameters:



1510
1511
# File 'docs/4_Systems_003_Map_Engine.rb', line 1510

def synchronize(animated_tile)
end

#update

Update the count value



1506
1507
# File 'docs/4_Systems_003_Map_Engine.rb', line 1506

def update
end