diff options
| author | Piotr Usewicz <[email protected]> | 2019-09-12 12:57:54 +0200 |
|---|---|---|
| committer | Piotr Usewicz <[email protected]> | 2019-09-12 12:57:54 +0200 |
| commit | 70233f88ca30ded0ccb84261db88afabe906068f (patch) | |
| tree | 3893040143b5af2d3be6ac9462d318ae1642aa0b | |
| parent | ed63989792a01eb58f38403e1814347396058119 (diff) | |
| download | dragonruby-game-toolkit-contrib-70233f88ca30ded0ccb84261db88afabe906068f.tar.gz dragonruby-game-toolkit-contrib-70233f88ca30ded0ccb84261db88afabe906068f.zip | |
Document state
| -rw-r--r-- | dragon/args.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dragon/args.rb b/dragon/args.rb index 0f39ede..cfd0502 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 |
