Module: Battle::SceneMock

Defined in:
docs/5_Battle_30_AI.rb

Overview

Module responsive of mocking the battle scene so nothing happen on the reality

How to use:

scene = @scene.clone
scene.extend(SceneMock)

Note: super inside this script might call the original function

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mock_actionsArray<Hash> (readonly)

Get the mock actions

Returns:

  • (Array<Hash>)


18
19
20
# File 'docs/5_Battle_30_AI.rb', line 18

def mock_actions
  @mock_actions
end

Class Method Details

.extended(mod)

Method called when a scene gets mocked (through extend)

Parameters:



13
14
# File 'docs/5_Battle_30_AI.rb', line 13

def extended(mod)
end

Instance Method Details

#display_message



30
31
# File 'docs/5_Battle_30_AI.rb', line 30

def display_message(*)
end

#display_message_and_wait



28
29
# File 'docs/5_Battle_30_AI.rb', line 28

def display_message_and_wait(*)
end

#message_window



26
27
# File 'docs/5_Battle_30_AI.rb', line 26

def message_window
end

#mock_clear_actions

Function that clears the mock actions



24
25
# File 'docs/5_Battle_30_AI.rb', line 24

def mock_clear_actions
end

#mock_push_action(data)

Function that pushes an action to the action array (thing that happens during execution)

Parameters:

  • data (Hash)


21
22
# File 'docs/5_Battle_30_AI.rb', line 21

def mock_push_action(data)
end

#update



32
33
# File 'docs/5_Battle_30_AI.rb', line 32

def update
end