1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #include "Controler.h"
- Controler::Controler()
- :m_mvt(0.0f, 0.0f), m_visee(0.0f, 0.0f), m_craft(false), m_tir(), m_search(), m_prevSearch()
- {
- m_tir[ L_HAND ] = m_tir[ R_HAND ] = false;
- m_search[ L_HAND ] = m_search[ R_HAND ] = false;
- m_prevSearch[ L_HAND ] = m_prevSearch[ R_HAND ] = false;
- }
- Controler::~Controler()
- {
- //dtor
- }
- Vec Controler::getMvt() const
- {
- return m_mvt;
- }
- Vec Controler::getVisee() const
- {
- return m_visee;
- }
- bool Controler::getCraft()
- {
- if ( m_craft != m_prevCraft ) {
- m_prevCraft = m_craft;
- return m_craft;
- }
- else return false;
- }
- bool Controler::getTir( unsigned short main ) const
- {
- return m_tir[ main ];
- }
- bool Controler::getSearch( unsigned short main )
- {
- if ( m_search[main] != m_prevSearch[main] ) {
- m_prevSearch[main] = m_search[main];
- return m_search[main];
- }
- else return false;
- }
|