// Use this for initialization void Awake() { rm = FindObjectOfType <RoundManager>(); //fd = FindObjectOfType<FurnitureDeletor>(); pp = FindObjectOfType <PlayerPlacer>(); //working on UI Manager }
/// <summary> /// Finds needed objects in the scene. /// </summary> private void Start() { blockManager = BlockManager.instance; player = PlayerPlacer.instance; int numBlocks = blocks.Length; textCounters = new Text[numBlocks]; for (int i = 0; i < numBlocks; i++) { textCounters[i] = blocks[i].GetComponentInChildren <Text>(); } }
// Use this for initialization void Awake() { DontDestroyOnLoad(this); if (roundManagerInstance == null) { roundManagerInstance = this; } else { Destroy(this.gameObject); } pp = FindObjectOfType <PlayerPlacer>(); fs = FindObjectOfType <FurnitureSelector>(); pp.InFurniture = false; currentRoundState = RoundState.HidingPlayer; }
// Update is called once per frame void Update() { //EndGame(); ControlDisplays(); //Second Monitor for Testing if (pp == null) { pp = FindObjectOfType <PlayerPlacer>(); } if (fs == null) { fs = FindObjectOfType <FurnitureSelector>(); } if (pp.InFurniture && pp.gameObject.GetComponent <Camera>().isActiveAndEnabled) { NextRound(); } else if (roundTimer <= 0) { NextRound(); } if (fs != null) { ForceNextRound(); MinusTimer(); } if (player1Score > 1) { player1Score = 1; } if (player2Score > 1) { player2Score = 1; } }
/// <summary> /// Initializes the object. /// </summary> private void Start() { player = PlayerPlacer.instance; crosshair = GetComponent <Text>(); }