Ejemplo n.º 1
0
        }         /* 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() */
Ejemplo n.º 2
0
 internal void RaisGameplayInactivationRequestedEvent(GameplayIDType gameplayID)
 {
     lock (this._eventTable)
     {
         var callback = (System.EventHandler <GameplayEventArgs>) this._eventTable["GameplayInactivationRequested"];
         callback?.Invoke(this, new GameplayEventArgs(gameplayID));
     }
 }
Ejemplo n.º 3
0
 // ctor
 public GameplayEventArgs(
     GameplayIDType gameplayID = GameplayIDType.None,
     bool bEnableBehaviour     = false,
     bool bActivateObject      = false
     )
     : base()
 {
     this.ID = gameplayID;
     this.EnableBehaviour = bEnableBehaviour;
     this.ActivateObject  = bActivateObject;
 }
Ejemplo n.º 4
0
        }         /* 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() */
Ejemplo n.º 5
0
        } /* 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() */