Method: Sc2::Player::Bot#on_unit_type_changed

Defined in:
lib/sc2ai/player.rb

#on_unit_type_changed(unit, previous_unit_type_id) ⇒ void

This method returns an undefined value.

Callback for unit type changing. To detect certain unit creations, you should use this method to watch morphs. Override to use in your bot class or use Player.

Parameters:

  • unit (Api::Unit)
  • previous_unit_type_id (Integer)

    Api::UnitTypeId::*



385
386
# File 'lib/sc2ai/player.rb', line 385

def on_unit_type_changed(unit, previous_unit_type_id)
end