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