} /* setActive() */ public void setInactive(GameplayIDType gameplayID) { lock (this._gameplayState) { if (this._gameplayState.ContainsKey(gameplayID)) { if (!this.IsActive(gameplayID)) { UnityEngine.Debug.LogWarning( "<color=orange>Warning: </color> ApollonGameplayManager.setInactive(" + gameplayID + ") : requested gameplayID is already inactive, skip" ); return; } this._gameplayState[gameplayID] = false; this.RaisGameplayInactivationRequestedEvent(gameplayID); } else { UnityEngine.Debug.LogWarning( "<color=orange>Warning: </color> ApollonGameplayManager.setInactive(" + gameplayID + ") : requested menuID is not intantiated yet..." ); return; } /* if() */ } /* lock() */ } /* setInactive() */
internal void RaisGameplayInactivationRequestedEvent(GameplayIDType gameplayID) { lock (this._eventTable) { var callback = (System.EventHandler <GameplayEventArgs>) this._eventTable["GameplayInactivationRequested"]; callback?.Invoke(this, new GameplayEventArgs(gameplayID)); } }
// ctor public GameplayEventArgs( GameplayIDType gameplayID = GameplayIDType.None, bool bEnableBehaviour = false, bool bActivateObject = false ) : base() { this.ID = gameplayID; this.EnableBehaviour = bEnableBehaviour; this.ActivateObject = bActivateObject; }
} /* RegisterAllAvailableGameplayBridge() */ public ApollonAbstractGameplayBridge getBridge(GameplayIDType ID) { // check if (this._gameplayBridgeTable.ContainsKey(ID)) { return(this._gameplayBridgeTable[ID]); } // log UnityEngine.Debug.LogWarning( "<color=orange>Warning: </color> ApollonGameplayManager.getBridge(" + ID + ") : requested ID not found ..." ); // failed return(null); } /* getBridge() */
} /* enum */ public bool IsActive(GameplayIDType gameplayID) { lock (this._gameplayState) { if (this._gameplayState.ContainsKey(gameplayID)) { return(this._gameplayState[gameplayID]); } else { UnityEngine.Debug.LogWarning( "<color=orange>Warning: </color> ApollonGameplayManager.IsActive(" + gameplayID + ") : requested gameplayID is not intantiated yet..." ); return(false); } /* if() */ } /* lock() */ } /* IsActive() */