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
-
#mock_actions ⇒ Array<Hash>
readonly
Get the mock actions.
Class Method Summary collapse
-
.extended(mod)
Method called when a scene gets mocked (through extend).
Instance Method Summary collapse
-
#display_message ⇒ Integer
Mock method called to display a message without waiting for user input.
-
#display_message_and_wait ⇒ Integer
Mock method called to display a message and wait for user input.
-
#message_window ⇒ nil
Mock method called to get the message window.
-
#mock_clear_actions
Function that clears the mock actions.
-
#mock_push_action(data)
Function that pushes an action to the action array (thing that happens during execution).
-
#update ⇒ nil
Mock update method that does nothing.
Instance Attribute Details
#mock_actions ⇒ Array<Hash> (readonly)
Get the mock actions
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)
13 14 |
# File 'docs/5_Battle_30_AI.rb', line 13 def extended(mod) end |
Instance Method Details
#display_message ⇒ Integer
This method ensures that no message is displayed during the mock
Mock method called to display a message without waiting for user input
39 40 |
# File 'docs/5_Battle_30_AI.rb', line 39 def (*) end |
#display_message_and_wait ⇒ Integer
This method ensures that no message is displayed during the mock
Mock method called to display a message and wait for user input
34 35 |
# File 'docs/5_Battle_30_AI.rb', line 34 def (*) end |
#message_window ⇒ nil
This method ensures that no message window is used during the mock
Mock method called to get the message window
29 30 |
# File 'docs/5_Battle_30_AI.rb', line 29 def 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)
21 22 |
# File 'docs/5_Battle_30_AI.rb', line 21 def mock_push_action(data) end |
#update ⇒ nil
Mock update method that does nothing
43 44 |
# File 'docs/5_Battle_30_AI.rb', line 43 def update end |