private SoundManager SndGame; //Class to Manager the Soundseffects #endregion #region Constructor public Game_Logic(int NumMaxPLayer) { int x; SndGame = new SoundManager(); /**********Creation Logic Game ********/ GameState = Game_States.INTRO; LstState = Game_States.INTRO; ScrennState = Game_SCR.RUNNING; CurrentPlayer = 0; MaxPlayers = NumMaxPLayer; Players = new Game_Player[MaxPlayers]; for (x = 0; x < MaxPlayers; x++) { Players[x] = new Game_Player(); } //Only the Player 1 Is connected (use the KeyBoard) AddPlayer("Player 1", 1); //Defino Personaje Por Player Players[0].PlySelect = 1; //Players[1].PlySelect = 4; //Players[2].PlySelect = 5; //Players[3].PlySelect = 8; Players[1].PlySelect = 2; Players[2].PlySelect = 3; Players[3].PlySelect = 4; /*** History ****/ HistoryIni = new string[8]; HistoryEnd = new string[8]; CreateHistory(); //Weapons Weapons = new Game_Weapon[MaxPlayers]; MaxWeapons = NumMaxPLayer; //pause PauseGame = false; //Initial Level Level = 0; LevelH = 10; //Mode Multiplayer MultiMode = Play_MultiMode.DEATHMATCH; //Mode of Game Mode = Game_Mode.MULTI_PLY; //Status Pause_Status = Pausa_Status.RETURN; }
// Update is called once per frame void Update() { UpdateGUI(); if ((mode == Game_Mode.playing) && Goal.goalMet) { mode = Game_Mode.levelEnd; SwitchView("Show Both"); Invoke("Next Level", 2f); } }
public void Start_Game() { game_mode_inst = this; kill_limit = PlayerPrefs.GetInt("Kill_Limit"); time_limit = PlayerPrefs.GetInt("Time_Limit"); hold_limit = PlayerPrefs.GetInt("Oddball_Hold_Limit"); //@NOTE not yet set round_limit = PlayerPrefs.GetInt("Round_Limit"); player_records = FindObjectOfType<In_Game_Record>(); players = player_records.Get_All_Players(); game_timer = FindObjectOfType<Game_Timer>(); StartCoroutine(Pre_Game_Countdown()); }
public static void Get_GameFaction(SQLiteConnection db_Connection, String Engine_Name, Game_Mode game_mode, ref Label label) { Get_GameFaction(db_Connection, Engine_Name); if (game_faction == null) return; if(game_mode.Engine_Name == "SquadDeathMatch0" || game_mode.Engine_Name == "SquadObliteration0") { label.Text = String.Format("Team 1: {0} -|- Team 2: {1} -|- Team 3: {0} -|- Team 4: {1}", game_faction.Team_1, game_faction.Team_2); } else { label.Text = String.Format("Team 1: {0} -|- Team 2: {1}", game_faction.Team_1, game_faction.Team_2); } }
void StartLevel() { if (castle = null) { Destroy(castle); } GameObject[] gos = GameObject.FindGameObjectsWithTag("Projectile"); foreach (GameObject pTemp in gos) { Destroy(pTemp); } castle = Instantiate <GameObject>(castles[level]); castle.transform.position = castlePos; shotsTaken = 0; SwitchView("wShow Both"); Goal.goalMet = false; UpdateGUI(); mode = Game_Mode.playing; }
void Load_Game_Mode() { string pref_game_mode = PlayerPrefs.GetString("Game_Mode"); switch (pref_game_mode) { case "Deathmatch": game_mode = this.gameObject.AddComponent <Deathmatch_Mode>(); break; case "Elimination": game_mode = this.gameObject.AddComponent <Elimination_Mode>(); break; case "Oddball": game_mode = this.gameObject.AddComponent <Oddball_Mode>(); break; default: print("NOT GAME MODE ADDED"); break; } }
public Game_Logic(int NumMaxPLayer) { int x; SndGame = new SoundManager(); /**********Creation Logic Game ********/ GameState = Game_States.INTRO; LstState = Game_States.INTRO; ScrennState = Game_SCR.RUNNING; CurrentPlayer = 0; MaxPlayers = NumMaxPLayer; Players = new Game_Player[MaxPlayers]; for (x = 0; x < MaxPlayers; x++) { Players[x] = new Game_Player(); } //Only the Player 1 Is connected (use the KeyBoard) AddPlayer("Player 1", 1); //Defino Personaje Por Player Players[0].PlySelect = 1; //Players[1].PlySelect = 4; //Players[2].PlySelect = 5; //Players[3].PlySelect = 8; Players[1].PlySelect = 2; Players[2].PlySelect = 3; Players[3].PlySelect = 4; /*** History ****/ HistoryIni = new string[8]; HistoryEnd = new string[8]; CreateHistory(); //Weapons Weapons = new Game_Weapon[MaxPlayers]; MaxWeapons = NumMaxPLayer; //pause PauseGame = false; //Initial Level Level = 0; LevelH = 10; //Mode Multiplayer MultiMode = Play_MultiMode.DEATHMATCH; //Mode of Game Mode = Game_Mode.MULTI_PLY; //Status Pause_Status = Pausa_Status.RETURN; }
public void init() { gamemode = Game_Mode.MAIN; }
public void set_mode(Game_Mode gm) { gamemode = gm; }