Class: Battle::Actions::Base
- Defined in:
- scripts/01600 Alpha 25 Battle Engine/03000 Actions/00001 Actions.rb
Overview
Base class for all actions
Instance Method Summary collapse
-
#<=>(other) ⇒ Integer
Compare this action with another.
-
#execute
Execute the action.
-
#initialize(scene) ⇒ Base
constructor
Creates a new action.
-
#valid? ⇒ Boolean
Tell if the action is valid.
Constructor Details
#initialize(scene) ⇒ Base
Creates a new action
8 9 10 |
# File 'scripts/01600 Alpha 25 Battle Engine/03000 Actions/00001 Actions.rb', line 8 def initialize(scene) @scene = scene end |
Instance Method Details
#<=>(other) ⇒ Integer
Compare this action with another
15 16 17 |
# File 'scripts/01600 Alpha 25 Battle Engine/03000 Actions/00001 Actions.rb', line 15 def <=>(other) return 1 end |
#execute
Execute the action
26 27 28 |
# File 'scripts/01600 Alpha 25 Battle Engine/03000 Actions/00001 Actions.rb', line 26 def execute return nil end |
#valid? ⇒ Boolean
Tell if the action is valid
21 22 23 |
# File 'scripts/01600 Alpha 25 Battle Engine/03000 Actions/00001 Actions.rb', line 21 def valid? return self.class != Base end |