public void EndPlacing() { if (indicator.GetComponent <TowerPlacingIndicator>().IsValid()) { GMaster.GetComponent <GameMaster> ().SpawnTower(indicator.transform, towerPF); } towerTopAppearance.SetActive(true); gameObject.GetComponent <Image> ().color = new Color(255, 255, 255, 255); Destroy(indicator); }
private void Inicializar() { button1.FlatAppearance.BorderSize = 0; button2.FlatAppearance.BorderSize = 0; button3.FlatAppearance.BorderSize = 0; //tableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; tablero = new GTablero(panel5); master = new GMaster(tablero, panel5, this); InicializarFuente(); changeFont(label5); }
void Update() { // GameSpeed = TimeScale.value; //Time.timeScale = TimeScale.value; //Time.fixedDeltaTime = 0.02f*(1/TimeScale.value); //Time.timeScale = TimeScale.value; //if (cd <= 0) //{ // float frame = Time.frameCount-oldframe; // Debug.Log("Sekunde " + i + " Frames " + frame); // oldframe = Time.frameCount; // cd += 1f; // i++; //} //cd -= Time.deltaTime; if (Input.GetKeyDown("escape")) { PauseMenu(); } MoneyDisplay.text = Money.ToString(); HealthDisplay.text = "Health : " + PlayerHealth; if (PlayerHealth <= 0) { GMaster.GetComponent <Script_GameMaster>().LastGameWon = false; SceneManager.LoadScene("EndScene"); } else if (EnemyCount <= 0) { GMaster.GetComponent <Script_GameMaster>().LastGameWon = true; SceneManager.LoadScene("EndScene"); } }