void Start() { m_gameManager = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameManager>(); m_gameWin = GameObject.FindGameObjectWithTag("UI").GetComponent <GameWin>(); m_layerController = m_gameManager.GetComponent <LayerController>(); m_launch = GetComponent <AudioSource>(); }
void Start() { gameWin = GetComponent <GameWin>(); ratingOutlineImage.gameObject.SetActive(false); ratingImage.gameObject.SetActive(false); reviewText.text = ""; scoreImage.fillAmount = 0; }
private void OnEnable() { if (Instance != null && Instance != this) { GameObject.DestroyImmediate(gameObject); return; } Instance = this; }
private void Awake() { if (instance != null && instance != this) { Destroy(transform.parent.gameObject); } else { instance = this; } instance.gameObject.SetActive(false); }
void WinGame() { if (score > 1) { PlayerPrefs.SetInt("levelReached", SceneManager.GetActiveScene().buildIndex); GameWin.SetActive(true); publicDeactivates(); gameWin = true; AlienCar.SetActive(false); AlienBullet.SetActive(false); AlienCar2.SetActive(false); } }
private void Update() { if (RunnerGameState.IsGameRunning) { _distanceToFinish -= Time.deltaTime; if (_distanceToFinish <= 0.0f) { RunnerGameState.IsGameRunning = false; isWin = true; GameWin?.Invoke(); } _distanceText.text = ((int)_distanceToFinish).ToString() + "m"; } }
public List <GameWin> GameWin(GameWin data) { string connStr = "data source=werewolfkill.database.windows.net;initial catalog=Werewolfkill;persist security info=True;user id=Werewolfkill;password=Wolfpeoplekill_2020;MultipleActiveResultSets=True;"; List <GameWin> r = null; using (SqlConnection conn = new SqlConnection(connStr)) { conn.Open(); var paramater = new Models.GameWin { Name = data.Name }; var sql = " UPDATE AspNetUsers SET Win = ISNULL(Win,0)+1 where UserName = @Name " + "select UserName as Name,Win from AspNetUsers where UserName = @Name "; r = conn.Query <GameWin>(sql, paramater).ToList(); } return(r); }
private void NewMap() { // Chance to increase difficulty if (difficultyLevel <= 0) { difficultyLevel++; } else if (Level % 8 == 0) // UnityEngine.Random.Range(1, 20) == 1 { difficultyLevel++; MessageLog_Manager.NewMessage("Monsters become stronger...", Color.red); if (difficultyLevel > 10) { // Game win Debug.Log("You won the game!"); Global.GameWin gameWin = new GameWin(); gameWin.FireEvent(); return; } } // TODO: PICK PROTOTYPE ACCORDING TO DIFFICULTY! if (difficultyLevel > 0) { List <LevelPrototype> potentialLevels = new List <LevelPrototype>(); for (int i = 0; i < levelPrototypes.Length; i++) { if (levelPrototypes[i].difficultyLevel >= difficultyLevel - 1 && levelPrototypes[i].difficultyLevel <= difficultyLevel) { potentialLevels.Add(levelPrototypes[i]); } } curLevelPrototype = potentialLevels[UnityEngine.Random.Range(0, potentialLevels.Count)]; } if (curLevelPrototype.Name == string.Empty) { curLevelPrototype = levelPrototypes[1]; } Debug.Log("New Map: diff=" + difficultyLevel + " curlvlProto name=" + curLevelPrototype.Name); mapManager.NewMap(Vector2.zero, Level, curLevelPrototype.darknessLevel); }
private void HandleParty() { if (cage) { cage.transform.Rotate(new Vector3(0, 0, 180)); } GameObject player = Player.GetInstance(); player.transform.position = new Vector3(endSpot, player.transform.position.y, player.transform.position.z); GameManager.DestroyObject(); GameWin.ShowGameWinScreen(); for (int i = 0; i < friends.Length; i++) { friends[i].StartParty(); } Player.GetInstanceControl().SetIsDancing(true); }
public List <GameWin> GameWin(GameWin data) { return(_repo.GameWin(data)); }
private void Awake() { Singleton = this; }
public List <GameWin> GameWin(GameWin data) { throw new NotImplementedException(); }
private void DrawGameWin(GameTime gameTime, GraphicsDeviceManager graphics, ContentManager content) { GameWin gameWin = new GameWin(this.spriteBatch, this.gameFont, content, graphics); }
private void OnGameWin(GameWin data) { winPanel.SetActive(true); }
public IActionResult GameWin(GameWin data) { return(Ok(_service.GameWin(data))); }
void Awake() { gamewin = gameWin.GetComponent <GameWin>(); }