Class: Pixiurge::Display::ParticleSource
- Inherits:
-
Pixiurge::Displayable
- Object
- Pixiurge::Displayable
- Pixiurge::Display::ParticleSource
- Defined in:
- lib/pixiurge/displayable/particle_source.rb
Overview
The server does none of the heavy lifting for configuring a Pixiurge particle source, but can still pass through enough parameters to make one happen. Early on we just pass the parameters through to the Javascript, but over time we can do more interesting verification on the server to make sure the particle source is basically reasonable and correct.
Instance Attribute Summary
Attributes inherited from Pixiurge::Displayable
#block_height, #block_width, #displayable_type, #location_displayable, #location_name, #name, #position, #x, #y
Instance Method Summary collapse
-
#initialize(particle_parameters, name:, engine_connector:) ⇒ ParticleSource
constructor
Constructor - create the particle source.
-
#messages_to_show_player(player) ⇒ Array
Show this Displayable to a player.
Methods inherited from Pixiurge::Displayable
#destroy_for_player, #move_for_player, #show_to_player
Constructor Details
#initialize(particle_parameters, name:, engine_connector:) ⇒ ParticleSource
Constructor - create the particle source
16 17 18 19 20 |
# File 'lib/pixiurge/displayable/particle_source.rb', line 16 def initialize particle_parameters, name:, engine_connector: @particle_parameters = particle_parameters @displayable_type = "particle_source" super(name: name, engine_connector: engine_connector) end |
Instance Method Details
#messages_to_show_player(player) ⇒ Array
Show this Displayable to a player.
27 28 29 30 31 |
# File 'lib/pixiurge/displayable/particle_source.rb', line 27 def (player) = super [0].merge!({ "params" => @particle_parameters }) end |