private void OnPlayerDeath() { if (ResetGame != null) { ResetGame.Invoke(); } }
public void Start() { inputManager = GetComponent <InputManager>(); uiController = GetComponent <UIController>(); stateMachineManager = GetComponent <StateMachineManager>(); gameMath = GetComponent <GameMath>(); timeCalculations = GetComponent <TimeCalculations>(); save = GetComponent <Save>(); load = GetComponent <Load>(); player = GetComponent <Player>(); resetGame = GetComponent <ResetGame>(); if (PlayerPrefs.GetInt("CheckIfGameIsSaved") == 1) { load.LoadGameState(); uiController.UIControllerUpdate(); gameMath.GetingGameState(); gameMath.CalculateLoadGameState(); CallingGameMathForHungerAndHappienessLoss(); } if (PlayerPrefs.GetInt("OrginalStartBool") == 1) { load.LoadOrignalGameDate(); } if (PlayerPrefs.GetInt("CheckIfGameIsSaved") != 1) { SetGameStart(); } }
public void BackButton() { fader.gameObject.SetActive(true); fader.DOColor(Color.black, 2f).onComplete = () => { mainMenuPanel.gameObject.SetActive(true); mainMenuPanel.alpha = 1; ResetGame?.Invoke(); }; }
//Open public Client(Player a, GetPlayerMove b, FindMatch c, RichTextBox d, ResetGame e, MainForm f) { player = a; wc = new WebClient(); mainform = f; getplayermove = b; findmatch = c; output = d; resetgame = e; MatchFinder = new Thread(FindQueue); MoveFinder = new Thread(GetOpponentMove); }
//LOAD private void NewForm_Load(object sender, EventArgs e) { graphics = Screen.CreateGraphics(); unitdestroly = OnUnitDestroly; sakkfor = OnSakkFor; findmatch = MatchFound; getplayermove = OppMove; resetgame = Reset; endform = new GEndForm(this); label5.Text += version; this.Opacity = 0; nameinput = new Chess.NameInput(this); nameinput.Show(); }
private void Start() { tiles = new Dictionary <Vector2, Tile>(); resetGame += ResetBoard; resetGame(); display.gameObject.SetActive(false); attackButton.SetActive(false); shop.SetupShop(teams); shop.HideShop(); shop.unitBought += UpdateUI; UpdateUI(); }
private void Awake() { int gameStatusCount = FindObjectsOfType <GameStatus>().Length; if (gameStatusCount > 1) { Destroy(gameObject); return; } else { DontDestroyOnLoad(gameObject); ResetGame.RegisterListener(onGameRestart); BlockDespawn.RegisterListener(OnBlockDespawn); SceneManager.sceneLoaded += onSceneLoaded; } }
public MapViewModel() { PlayerData = new PlayerDataModel(100, 200); this.simpleCommand = new SimpleCommand(this); this.towerCommand = new PlaceTowerCommand(this); this.resetGame = new ResetGame(this); //Creates tick object Tick = new TickTimer(this); LoadRoute(); StartGame(); //Adds debug enemy //Starts game RoutedEvent[] events = EventManager.GetRoutedEvents(); TowerHover.TowerHoverVisibillity = 0.0; for (int i = 0; i < 5; i++) { GenerateRockFormations(); } }
public Table(Graphics a, Player b, Player c, RichTextBox d, UnitDestroly e, SakkFor f, ResetGame g) { //Get Grap Create Recs output = d; resetgame = g; graphics = a; unitdestroly = e; sakkfordel = f; //Add Players players.Add(b); players.Add(c); //Readin Files figures = GetFiguresIMG(); //Setup Table units = SetUpTable(); Show(); }
private void Awake() { instance = this; }
private void btnResetGame_Click(object sender, RoutedEventArgs e) { ResetGame?.Invoke(this, EventArgs.Empty); }
void Start() { res = gm.GetComponent <ResetGame>(); }
/// <summary> /// lanza el evento de reset /// </summary> internal void RaiseEventReset() { ResetGame?.Invoke(this, EventArgs.Empty); }
private void button1_Click(object sender, EventArgs e) { ResetGame?.Invoke(); }
private void onGameRestart(ResetGame info) { //Destroy itself. Reloading the scene should then recreate it with initial values. Destroy(gameObject); }
/// <summary> /// lanza el evento de reset /// </summary> private void RaiseEventReset() { ResetGame?.Invoke(this, EventArgs.Empty); }
protected virtual void OnResetGame() { ResetGame?.Invoke(); }
private void OnDisable() { ResetGame.UnregisterListener(onGameRestart); BlockDespawn.UnregisterListener(OnBlockDespawn); SceneManager.sceneLoaded -= onSceneLoaded; }