diff options
| author | Amir Rajan <[email protected]> | 2019-09-12 06:06:13 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-09-12 06:06:13 -0500 |
| commit | 6ac512ba37f8ceedf79b92587d963a316bea579e (patch) | |
| tree | 75ee201eb8c81ae57f83c3e2cbdb1df9fc3a4489 | |
| parent | ed63989792a01eb58f38403e1814347396058119 (diff) | |
| parent | 78df48ecd4b5523f1c6c173e3dec7fc20bbc69dc (diff) | |
| download | dragonruby-game-toolkit-contrib-6ac512ba37f8ceedf79b92587d963a316bea579e.tar.gz dragonruby-game-toolkit-contrib-6ac512ba37f8ceedf79b92587d963a316bea579e.zip | |
Merge pull request #7 from pusewicz/pu-document-state
Document state
| -rw-r--r-- | dragon/args.rb | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/dragon/args.rb b/dragon/args.rb index 0f39ede..0b9a2eb 100644 --- a/dragon/args.rb +++ b/dragon/args.rb @@ -163,10 +163,18 @@ module GTK @runtime end + # @return [OpenEntity] returns `OpenEntity` object that allows for storing state between ticks + # @example Storing a value in a state + # args.state.player_score = 0 + # args.state.current_time = Time.now def state @state end + # @param value [OpenEntity] the new state object to use + # @return [OpenEntity] the new state object + # @example Overwriting the state object + # args.state = OpenEntity.new def state= value @state = value end @@ -198,7 +206,7 @@ module GTK @render_targets[name] end - # @return [GTK::OutputsArray] The array of solids to render during current tick + # @return [GTK::OutputsArray] the array of solids to render during current tick def solids @outputs.solids end @@ -207,7 +215,7 @@ module GTK @outputs.static_solids end - # @return [GTK::OutputsArray] The array of sprites to render during current tick + # @return [GTK::OutputsArray] the array of sprites to render during current tick def sprites @outputs.sprites end @@ -216,7 +224,7 @@ module GTK @outputs.static_sprites end - # @return [GTK::OutputsArray] The array of labels to render during current tick + # @return [GTK::OutputsArray] the array of labels to render during current tick def labels @outputs.labels end @@ -225,7 +233,7 @@ module GTK @outputs.static_labels end - # @return [GTK::OutputsArray] The array of lines to render during current tick + # @return [GTK::OutputsArray] the array of lines to render during current tick def lines @outputs.lines end @@ -234,7 +242,7 @@ module GTK @outputs.static_lines end - # @return [GTK::OutputsArray] The array of borders to render during current tick + # @return [GTK::OutputsArray] the array of borders to render during current tick def borders @outputs.borders end |
