mirror of
https://github.com/ApfelTeeSaft/gameBase.git
synced 2026-08-26 19:23:30 +00:00
method name change
This commit is contained in:
+4
-4
@@ -6,12 +6,12 @@ namespace gameBase {
|
|||||||
appStates[i]->update();
|
appStates[i]->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateManager::attachState(AbstractAppState *a){
|
void StateManager::attachAppState(AbstractAppState *a){
|
||||||
appStates.push_back(a);
|
appStates.push_back(a);
|
||||||
a->onAttached();
|
a->onAttached();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateManager::dettachState(AbstractAppState *a){
|
void StateManager::dettachAppState(AbstractAppState *a){
|
||||||
int id=-1;
|
int id=-1;
|
||||||
|
|
||||||
for(int i = 0; i < appStates.size() && id == -1; i++)
|
for(int i = 0; i < appStates.size() && id == -1; i++)
|
||||||
@@ -24,7 +24,7 @@ namespace gameBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StateManager::dettachStateByType(int type){
|
void StateManager::dettachAppStateByType(int type){
|
||||||
int id = -1;
|
int id = -1;
|
||||||
|
|
||||||
for(int i = 0; i < appStates.size() && id == -1; i++)
|
for(int i = 0; i < appStates.size() && id == -1; i++)
|
||||||
@@ -37,7 +37,7 @@ namespace gameBase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractAppState* StateManager::getStateByType(int type){
|
AbstractAppState* StateManager::getAppStateByType(int type){
|
||||||
AbstractAppState *a = nullptr;
|
AbstractAppState *a = nullptr;
|
||||||
|
|
||||||
for(int i = 0; i < appStates.size() && !a; i++)
|
for(int i = 0; i < appStates.size() && !a; i++)
|
||||||
|
|||||||
+6
-6
@@ -11,12 +11,12 @@ namespace gameBase {
|
|||||||
StateManager(){}
|
StateManager(){}
|
||||||
~StateManager(){}
|
~StateManager(){}
|
||||||
void update();
|
void update();
|
||||||
void attachState(AbstractAppState *a);
|
void attachAppState(AbstractAppState *a);
|
||||||
void dettachState(AbstractAppState*);
|
void dettachAppState(AbstractAppState*);
|
||||||
void dettachStateByType(int);
|
void dettachAppStateByType(int);
|
||||||
inline void dettachStateById(int id){appStates.erase(appStates.begin() + id);}
|
inline void dettachAppStateById(int id){appStates.erase(appStates.begin() + id);}
|
||||||
inline AbstractAppState* getStateById(int i){return appStates[i];}
|
inline AbstractAppState* getAppStateById(int i){return appStates[i];}
|
||||||
AbstractAppState* getStateByType(int);
|
AbstractAppState* getAppStateByType(int);
|
||||||
inline std::vector<AbstractAppState*> getAppStates(){return appStates;}
|
inline std::vector<AbstractAppState*> getAppStates(){return appStates;}
|
||||||
inline int getNumAppStates(){return appStates.size();}
|
inline int getNumAppStates(){return appStates.size();}
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user