Class: Cukunity::Unity::Scene
- Inherits:
-
JSONContainer
- Object
- JSONContainer
- Cukunity::Unity::Scene
- Defined in:
- lib/cukunity/unity/scene.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Attributes inherited from JSONContainer
Instance Method Summary collapse
- #gameobjects ⇒ Object
-
#initialize(client, *args) ⇒ Scene
constructor
A new instance of Scene.
Methods inherited from JSONContainer
#has_key?, #keys, #method_missing, #to_s, #value_of
Methods included from Cukunity::Utils
#check_timeout, #merge_options, #restrict_options, #to_options, #wait_connectivity
Constructor Details
#initialize(client, *args) ⇒ Scene
Returns a new instance of Scene.
6 7 8 9 |
# File 'lib/cukunity/unity/scene.rb', line 6 def initialize(client, *args) @client = client super(*args) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cukunity::Unity::JSONContainer
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
4 5 6 |
# File 'lib/cukunity/unity/scene.rb', line 4 def client @client end |
Instance Method Details
#gameobjects ⇒ Object
11 12 13 14 15 |
# File 'lib/cukunity/unity/scene.rb', line 11 def gameobjects @gameobjects ||= (value_of('gameObjects') || []).map do |json| Unity::GameObject.new(json, self) end end |