void Start() { ns_cs = GS_ns.GetComponent <notes_speed>(); qazas = qazAS.GetComponent <AudioSource>(); enteras = enterAS.GetComponent <AudioSource>(); scAni = ScoreCanvas.GetComponent <Animator>(); cs_geneqaz = GS_geneQAZ.GetComponent <generatorQAZ>(); JudgTextSwitch(3); }
void Start() { ns_cs = GS_ns.GetComponent <notes_speed>(); reset_score(); se = SE.GetComponent <AudioSource>(); se.volume = option_main.get_se_num() / 100f; scAni = ScoreCanvas.GetComponent <Animator>(); cs_geneqaz = GS_geneQAZ.GetComponent <generatorQAZ>(); JudgTextSwitch(3); }
// Start is called before the first frame update // add random force direction, sprite, torque to asteroid void Start() { asteroidRigidBody = gameObject.GetComponent <Rigidbody2D>(); asteroidRigidBody.AddForce(RandomVector2() * ThrustForce, ForceMode2D.Force); asteroidRigidBody.AddTorque(Random.Range(-2, 2)); GameObject canvas = GameObject.FindGameObjectWithTag("scoreCanvas"); score = canvas.GetComponent <ScoreCanvas>(); }
private void initializeGameStatesCanvas() { WinConditionText.enabled = false; ConditionText.enabled = false; ScoreCanvas.SetActive(false); LevelSelectCanvas.SetActive(false); BeginCanvas.SetActive(true); NeedIntroPanel.gameObject.SetActive(false); GameOverCanvas.SetActive(false); GameWinCanvas.SetActive(false); GamePauseCanvas.SetActive(false); }
public GameObject m_pre_DestroyedRobot; //Prefab for a destroyed robot. private void Awake() { if (inst == null) { inst = this; } else { Debug.Log("ScoreCanvas destroyed on '" + gameObject.name + "'. Are there duplicates in the scene?"); DestroyImmediate(this); } }
void Start() { scoreCanvas = GameObject.FindObjectOfType <ScoreCanvas>(); correctLayer = gameObject.layer; spriteRenderer = GetComponent <SpriteRenderer>(); if (spriteRenderer == null) { spriteRenderer = GetComponentInChildren <SpriteRenderer>(); if (spriteRenderer == null) { Debug.Log("No SpriteRenderer"); } } }
void DoNextQuestions() { CurrentCanvas.SetActive(false); this.gameObject.SetActive(false); if (!IsMainController) { GameControllerScript.ActivateCurrentController(); } else { ScoreCanvas.SetActive(true); PlayerPrefs.SetInt("Score", Score); } }
void DoNextQuestions() { CurrentCanvas.SetActive(false); this.gameObject.SetActive(false); if (!IsMainController) { GameControllerScript.ActivateCurrentController(); } else { ScoreCanvas.SetActive(true); PlayerPrefs.SetInt("Score", Score); } StarParent.transform.GetChild(0).GetComponent <Image>().sprite = EmptyStar; StarParent.transform.GetChild(1).GetComponent <Image>().sprite = EmptyStar; StarParent.transform.GetChild(2).GetComponent <Image>().sprite = EmptyStar; }
private void NewGame(HardLevel hardlevel) { GameState = GameStates.Playing; Time.timeScale = 1f; initializeScoreCanvas(); LevelSelectCanvas.SetActive(false); ScoreCanvas.SetActive(true); NewLineGenerator.Initialize(); BlocksManager.Instance.ResetGame(); switch (hardlevel) { case HardLevel.Easy: BlocksManager.Instance.AddLinesOfBlock(3); break; case HardLevel.Hard: BlocksManager.Instance.AddLinesOfBlock(4); break; case HardLevel.Nightmare: BlocksManager.Instance.AddLinesOfBlock(5); break; } }
// Start is called before the first frame update void Start() { Time.timeScale = 0; Score.score = 0; ScoreCanvas.SetActive(false); }
public void tapToStart() { Time.timeScale = 1; CanvasStart.SetActive(false); ScoreCanvas.SetActive(true); }
void Start() { score = GameObject.Find("Canvas").gameObject.GetComponent <ScoreCanvas>(); }