Module: GamePlay::MenuMixin

Included in:
Menu
Defined in:
scripts/01450 Systems/00100 Menu/00003 GamePlay/00099 MenuMixin.rb

Overview

Module defining the IO of the menu scene so user know what to expect

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#call_skill_processArray, Proc

Get the process that is executed when a skill is used somewhere

Returns:

  • (Array, Proc)


6
7
8
# File 'scripts/01450 Systems/00100 Menu/00003 GamePlay/00099 MenuMixin.rb', line 6

def call_skill_process
  @call_skill_process
end

Instance Method Details

#execute_skill_process

Execute the skill process



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'scripts/01450 Systems/00100 Menu/00003 GamePlay/00099 MenuMixin.rb', line 9

def execute_skill_process
  return unless @call_skill_process

  case @call_skill_process
  when Array
    return if @call_skill_process.empty?

    block = @call_skill_process.shift
    block.call(*@call_skill_process)
    @call_skill_process = nil
  when Proc
    @call_skill_process.call
    @call_skill_process = nil
  end
end