/// <summary> /// Triggers actions to start a new game /// </summary> private void TriggerGameStart() { //Fire event to load game //(i.e reset level offset) LevelStarted?.Invoke(); gameRunning = true; }
void Start() { _playerScore = _enemyScore = 0; //Set Points Require To Win LevelStarted?.Invoke(_requireToWin, isBonusLevel); }
private void BSEvents_gameSceneActive() { if (BailOutController.instance != null) { GameObject.Destroy(BailOutController.instance); } //new GameObject("BailOutController").AddComponent<BailOutController>(); LevelStarted?.Invoke(this, EventArgs.Empty); }
public static void RestartGame() { //Fire event to load game //(i.e reset level offset) LevelStarted?.Invoke(); LevelUnPaused?.Invoke(); CurrentTurn = GameTurn.TURN_PLAYER; }
private void GameScenesManager_transitionDidFinishEvent(ScenesTransitionSetupDataSO _, DiContainer container) { IDifficultyBeatmap beatmap = container.TryResolve <IDifficultyBeatmap>(); if (beatmap != null) { LevelStarted?.Invoke(beatmap.level); } }
// Traps were chosen and the actual game can start // TODO Implement a system for choosing traps/spells in a level private void OnTrapsChosen() { gameplayUIData.menuCanvas.SetActive(false); ShowMenuPanel(null); CrosshairSetActive(true); ShowLevelStartMessage(); LevelStarted?.Invoke(); GameManager.Instance.ChangePauseState(false, false); }
// Start is called before the first frame update void Start() { //Check for an existing instance and destory //if one exists if (instance != null) { Destroy(this); return; } instance = this; //Call Level Started Event LevelStarted?.Invoke(); //Start the game with the player's turn CurrentTurn = GameTurn.TURN_PLAYER; //Call event for new turn started GameTurnStarted?.Invoke(CurrentTurn); }
/// <summary>Handles incomming messages. This method is running own the thread created in <see cref="Connect(string, string, int)"/>.</summary> /// <param name="messages">Incomming messages.</param> private void Handle(IEnumerable <IToAlchemy> messages) { foreach (var message in messages) { switch (message) { case ChatMessageToAlchemy chatMessage: invoke(() => ReceivedMessage?.Invoke(chatMessage.Message)); break; case SendIngredient ingredient: invoke(() => ReceivedIngredient?.Invoke(ingredient.Ingredient, ingredient.Pipe)); break; case StartLevel startLevel: invoke(() => LevelStarted?.Invoke(LevelConfig.FromMutable(startLevel.Config))); break; case WelcomeAlchemistIAm welcome: invoke(() => Connected?.Invoke(welcome.Username)); break; } } }
public void StartNewLevel() { lvl++; LevelStarted?.Invoke(lvl); }
private void SceneInfoOnRunButtonClicked(SceneInfo caller, SceneDataSO sceneData) { SceneManager.LoadScene(sceneData.Scene); LevelStarted?.Invoke(this, sceneData); }
public void StartLevel() { LevelStarted?.Invoke(); Utils.PickupSpawner.StartSpawning(); }
public void OnARLevelStarted(ARLevel _startedLevel) { LevelStarted?.Invoke(_startedLevel); }
protected void OnLevelStarted() { LevelStarted? .Invoke(this, EventArgs.Empty); }
/// <summary> /// Start the Game Level /// </summary> public static void StartLevel() { LevelStarted?.Invoke(); }
public static void CallLevelStarted() { LevelStarted?.Invoke(); }