Skip to content
Snippets Groups Projects
idareplayobserver.rst 1.12 KiB
Newer Older
Rojikku98's avatar
Rojikku98 committed
IDAReplayObserver
=================

.. class:: library.IDAReplayObserver

Rojikku98's avatar
Rojikku98 committed
   This is a class for following a replay. Se :ref:`Replays <replays>` for a example.

   Inherited methods:

   .. method:: IDAReplayObserver.on_game_start(self)

Rojikku98's avatar
Rojikku98 committed
      This method is called when a replay has stared, when you inherit it you have to
      call the parent's on_game_start method in order to make it work (see
      :ref:`replays`).

   .. method:: IDAReplayObserver.on_step(self)

      This method is called on every tick of the replay, when you inherit it you
      have to call the parent's on_step method in order to make it work (see
      :ref:`replays`).

   .. method:: IDAReplayObserver.on_game_end(self)

      This method is called when the replay has ended, when you inherit it you have to
      call the parent's on_game_start method in order to make it work (see
      :ref:`replays`).

   Methods:

Rojikku98's avatar
Rojikku98 committed
   .. method:: IDAReplayObserver.get_all_units(self) -> List[library.ReplayUnit]

      Retrieves a list of all visible units

Rojikku98's avatar
Rojikku98 committed
   .. method:: IDAReplayObserver.get_player_race(self, player_id) -> library.Race
Rojikku98's avatar
Rojikku98 committed
      Returns the players race