private void InitNetGameStats() { this.state = IntermissionState.StatCount; this.accelerateStage = false; this.ngState = 1; this.pauseCount = GameConst.TicRate; var frags = 0; for (var i = 0; i < Player.MaxPlayerCount; i++) { if (!this.options.Players[i].InGame) { continue; } this.killCount[i] = this.itemCount[i] = this.secretCount[i] = this.fragCount[i] = 0; frags += this.GetFragSum(i); } this.doFrags = frags > 0; this.InitAnimatedBack(); }
private void InitDeathmatchStats() { this.state = IntermissionState.StatCount; this.accelerateStage = false; this.dmState = 1; this.pauseCount = GameConst.TicRate; for (var i = 0; i < Player.MaxPlayerCount; i++) { if (this.options.Players[i].InGame) { for (var j = 0; j < Player.MaxPlayerCount; j++) { if (this.options.Players[j].InGame) { this.dmFragCount[i][j] = 0; } } this.dmTotalCount[i] = 0; } } this.InitAnimatedBack(); }
public void BuyBuilding(BuildingType type) { //Tell build contoller buildingCtrl.PlacingBuilding(type); //Update values intmsnState = IntermissionState.PLACING_BUILDING; }
private void WI_initShowNextLoc() { state = IntermissionState.ShowNextLoc; acceleratestage = false; cnt = SHOWNEXTLOCDELAY * GameConstants.TicRate; //WI_initAnimatedBack(); }
private void InitShowNextLoc() { this.state = IntermissionState.ShowNextLoc; this.accelerateStage = false; this.count = Intermission.showNextLocDelay * GameConst.TicRate; this.InitAnimatedBack(); }
private void InitShowNextLoc() { state = IntermissionState.ShowNextLoc; accelerateStage = false; count = showNextLocDelay * GameConst.TicRate; InitAnimatedBack(); }
//////////////////////////////////////////////////////////// // Initialization //////////////////////////////////////////////////////////// private void InitSinglePLayerStats() { state = IntermissionState.StatCount; accelerateStage = false; spState = 1; killCount[0] = itemCount[0] = secretCount[0] = -1; timeCount = parCount = -1; pauseCount = GameConst.TicRate; InitAnimatedBack(); }
public void PlacedBuilding(BuildingType type) { //Update values intmsnState = IntermissionState.NORMAL; //pay money -= BuildingLibrary.I.GetDefinition(type).buildPrice; //UI UpdateInfoPanel(); }
//////////////////////////////////////////////////////////// // Initialization //////////////////////////////////////////////////////////// private void InitSinglePLayerStats() { this.state = IntermissionState.StatCount; this.accelerateStage = false; this.spState = 1; this.killCount = this.itemCount = this.secretCount = -1; this.timeCount = this.parCount = -1; this.pauseCount = GameConst.TicRate; this.InitAnimatedBack(); }
private void InitStats() { state = IntermissionState.StatCount; acceleratestage = false; sp_state = 1; cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1; cnt_time = cnt_par = -1; cnt_pause = GameConstants.TicRate; // WI_initAnimatedBack(); }
public void EnterStage() { game = GameManager.Instance; if (!game.HasSpeedUpgrade()) { speedUpgrade = Instantiate(PFspeedUpgrade, new Vector3(game.ScreenBounds.x * 2, 3), Quaternion.identity); } if (!game.HasShieldUpgrade()) { shieldUpgrade = Instantiate(PFshieldUpgrade, new Vector3(game.ScreenBounds.x * 2 + 10, 3), Quaternion.identity); } alien = Instantiate(PFalien, new Vector3(game.ScreenBounds.x * 2 + 12, -2), Quaternion.identity); state = IntermissionState.AlienEntering; }
private void SwitchState(GameState state) { this.state = state; switch (state) { case GameState.GAME: break; case GameState.INTERMISSION: intmsnState = IntermissionState.NORMAL; break; default: break; } uiCtrl.SwitchState(state); }
private void InitNetGameStats() { state = IntermissionState.StatCount; accelerateStage = false; ngState = 1; pauseCount = GameConst.TicRate; var frags = 0; for (var i = 0; i < Player.MaxPlayerCount; i++) { if (!options.Players[i].InGame) { continue; } killCount[i] = itemCount[i] = secretCount[i] = fragCount[i] = 0; frags += GetFragSum(i); } doFrags = frags > 0; InitAnimatedBack(); }
private void InitNoState() { this.state = IntermissionState.NoState; this.accelerateStage = false; this.count = 10; }
private void InitNoState() { state = IntermissionState.NoState; accelerateStage = false; count = 10; }
// Update is called once per frame void Update() { switch (state) { case IntermissionState.AlienEntering: //speedUpgrade.GetComponent<Rigidbody2D>().AddForce(new Vector2(-speed, 0)); //shieldUpgrade.GetComponent<Rigidbody2D>().AddForce(new Vector2(-speed, 0)); //alien.GetComponent<Rigidbody2D>().AddForce(new Vector2(-speed, 0)); if (speedUpgrade != null) { if (speedUpgrade.transform.position.x > -5) { speedUpgrade.transform.position += new Vector3(-1f, 0, 0) * speed; } } if (shieldUpgrade != null) { if (shieldUpgrade.transform.position.x > 5) { shieldUpgrade.transform.position += new Vector3(-1f, 0, 0) * speed; } } if (alien != null) { if (alien.transform.position.x > 7) { alien.transform.position += new Vector3(-1f, 0, 0) * speed; } else { //speedUpgrade.transform.position = new Vector3(-5, 3, 1); //shieldUpgrade.transform.position = new Vector3(5, 3, 1); //alien.transform.position = new Vector3(7, -2, 1); state = IntermissionState.PlayerChoosing; } } else { //debug if the above somehow fails state = IntermissionState.AlienLeaving; } break; case IntermissionState.PlayerChoosing: if (playerHasChosen) { state = IntermissionState.AlienLeaving; } break; case IntermissionState.AlienLeaving: if (speedUpgrade != null) { speedUpgrade.transform.position += new Vector3(0, -1f, 0) * speed; } if (shieldUpgrade != null) { shieldUpgrade.transform.position += new Vector3(0, -1f, 0) * speed; } if (alien != null) { alien.transform.position += new Vector3(0, -1f, 0) * speed; } break; default: break; } }
private void Awake() { state = IntermissionState.Default; }
public void EndStage() { state = IntermissionState.AlienLeaving; }
private void WI_initNoState() { state = IntermissionState.NoState; acceleratestage = false; cnt = 10; }