|
Enki
1.9
|
Feeding interaction gives or remove energy to nearby Sbots. More...
#include <SbotObject.h>
Public Member Functions | |
| SbotFeeding (double r, Robot *owner) | |
| Constructor, r is the radius of the interaction. | |
| virtual void | objectStep (double dt, PhysicalObject *po, World *w) |
| virtual void | finalize (double dt) |
Public Member Functions inherited from Enki::LocalInteraction | |
| LocalInteraction () | |
| Constructor. | |
| LocalInteraction (double range, Robot *owner) | |
| Constructor. | |
| virtual | ~LocalInteraction () |
| Destructor. | |
| virtual void | init (double dt, World *w) |
| Init at each step. | |
| virtual void | objectStep (double dt, World *w, PhysicalObject *po) |
| Interact with object. More... | |
| virtual void | wallsStep (double dt, World *w) |
| Interact with walls. More... | |
| virtual void | finalize (double dt, World *w) |
| Finalize at each step. | |
| double | getRange () const |
| Return the range of the interaction. | |
Public Attributes | |
| double | actualEnergy |
| The energy in stock. | |
| double | actualTime |
| The actual time. | |
| double | activeDuration |
| The duration of active period. | |
| double | inactiveDuration |
| The duration of inactive period. | |
| Color | activeColor |
| The color of the object when active: (actualTime % (activeDuration+inactiveDuration) < activeDuration) | |
| Color | inactiveColor |
| The color of the object when inactive: (actualTime % (activeDuration+inactiveDuration) >= activeDuration) | |
| bool | consumeEnergy |
| If true, energy given to the Sbots is removed from actualEnergy. | |
| double | dEnergyActive |
| The energy difference per second when active. | |
| double | dEnergyInactive |
| The energy difference per second when inactive. | |
Additional Inherited Members | |
Protected Attributes inherited from Enki::LocalInteraction | |
| double | r |
| Radius of the local interaction. | |
| Robot * | owner |
| The physical object that owns the interaction. | |
Feeding interaction gives or remove energy to nearby Sbots.
1.8.11