Class: MSPhysics::ControllerContext

Inherits:
CommonContext show all
Includes:
Math
Defined in:
RubyExtension/MSPhysics/controller_context.rb

Overview

All controllers are evaluated under the ControllerContext scope.

Since:

  • 1.0.0

Instance Method Summary collapse

Methods inherited from CommonContext

#accumulator, #delete_global_var, #delete_var, #frame, #get_global_var, #get_set_global_var, #get_set_var, #get_var, #joybutton, #joypad, #joystick, #key, #key_slider, #leftx, #lefty, #leftz, #numx, #numy, #oscillator, #oscillator2, #oscillator2_slope, #oscillator_slope, #repeater, #rightx, #righty, #rightz, #set_global_var, #set_var, #simulation, #singular_repeater, #slider, #toggle_key, #world

Methods inherited from Entity

#inspect, #to_s

Constructor Details

#initializeControllerContext

Returns a new instance of ControllerContext.

Since:

  • 1.0.0



9
10
11
# File 'RubyExtension/MSPhysics/controller_context.rb', line 9

def initialize
  super()
end

Instance Method Details

#eval_script(script, script_name, line) ⇒ Object

Parameters:

  • script (String)
  • script_name (String)
  • line (Integer)

Since:

  • 1.0.0



16
17
18
# File 'RubyExtension/MSPhysics/controller_context.rb', line 16

def eval_script(script, script_name, line)
  eval(script, binding, script_name, line)
end