// Start is called before the first frame update void Awake() { TimeRound = startTime; if (roundCount == 1) { ScoreManager.InitScores(); } playerCount = 0; for (int i = 0; i < players.Count; i++) { players[i].eliminated = playerOrder[i] == -1; players[i].gameObject.SetActive(!players[i].eliminated); playerDamages[i].gameObject.SetActive(!players[i].eliminated); if (!players[i].eliminated) { playerCount++; } } blackPanel.Hide(); state = GameState.INITIALIZE; startScreen.SetActive(true); Instance = this; isPaused = -1; eliminationOrder = new List <PlayerController>(); StartCoroutine(ReadyStartAnim()); timerText = GameObject.Find("TextTimer").GetComponent <Text>(); int min = (int)(TimeRound / 60.0f); int sec = (int)(TimeRound - (min * 60)); timerText.text = "0" + min + ":" + sec + "0"; camera = Camera.main.GetComponent <CameraManager>(); audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); }
// Start is called before the first frame update void Start() { audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); for (int i = 0; i < 4; i++) { GameManager.playerOrder[i] = -1; } }
// Start is called before the first frame update void Start() { audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); blackPanel.Hide(); initializing = true; numberTurnSlider.value = GameManager.maxRund; timerSlider.value = GameManager.startTime / 30; initializing = false; audioManager.PlayMusic(MotherFuckingAudioManager.MusicList.MENU); }
// Start is called before the first frame update void Start() { audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); charging = false; state = PlayerState.NORMAL; anim = GetComponentInChildren <Animator>(); rBody = GetComponent <Rigidbody>(); damageText = GameObject.Find("TextDamages" + index).GetComponent <Text>(); damageAnimator = damageText.gameObject.GetComponent <Animator>(); scoreText = GameObject.Find("TextScore" + index).GetComponent <Text>(); scoreAnimator = scoreText.gameObject.GetComponent <Animator>(); scoreText.text = ScoreManager.FinalScore(index - 1).ToString("00"); renderer = GetComponentInChildren <SpriteRenderer>(); }
private void Awake() { if (Instance != this && Instance != null) { Destroy(gameObject); } else { Instance = this; DontDestroyOnLoad(this); } for (int i = 0; i <= soundEmitterNumber; i++) { GameObject audioObject = Instantiate(emitterPrefab, emitterPrefab.transform.position, emitterPrefab.transform.rotation); emitters.Add(audioObject.GetComponent <AudioSource>()); DontDestroyOnLoad(audioObject); } musicEmitters = GetComponents <AudioSource>(); PlayMusic(MusicList.MENU); }
// Start is called before the first frame update void Start() { audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); }
private void Start() { audioManager = GameObject.Find("AudioManager").GetComponent <MotherFuckingAudioManager>(); StartCoroutine(ShowAnim()); }