Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

KoduState.h

Go to the documentation of this file.
00001 #ifndef KODU_STATE_H_
00002 #define KODU_STATE_H_
00003 #include "Events/EventRouter.h"
00004 #include "Shared/Gamepad.h"
00005 #include <iostream>
00006 #include <vector>
00007 
00008 namespace Kodu {
00009 
00010 
00011 class KoduState {
00012 public:
00013   struct utterance {
00014       int hostAddr;
00015       std::string phrase;
00016   };
00017 
00018   KoduState() :
00019     abutton(0.0), bbutton(0.0), xbutton(0.0), ybutton(0.0),
00020     leftbumper(0.0), rightbumper(0.0), joystickx(0.0), joysticky(0.0), joystick_fullstop(false),
00021     heard_utt()
00022     {}
00023 
00024   void addUtterance(utterance uttered) {
00025       heard_utt.push_back(uttered);
00026   }
00027 
00028   void clearUtterances() {
00029       heard_utt.clear();
00030   }
00031 
00032   void update(int generatoregid, int sourceid, float magnitude);
00033 
00034   // Gamepad State
00035   float abutton;
00036   float bbutton;
00037   float xbutton;
00038   float ybutton;
00039   float leftbumper;
00040   float rightbumper;
00041   float joystickx;
00042   float joysticky;
00043 
00044   bool joystick_fullstop;
00045 
00046   std::vector<utterance> heard_utt; //!< Utterances heard since last rule cycle
00047 };
00048 
00049 } // namespace
00050 
00051 #endif

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:43 2016 by Doxygen 1.6.3