Exemplo n.º 1
0
    // Use this for initialization
    void Awake()
    {
        rm = FindObjectOfType <RoundManager>();

        //fd = FindObjectOfType<FurnitureDeletor>();
        pp = FindObjectOfType <PlayerPlacer>();

        //working on UI Manager
    }
Exemplo n.º 2
0
        /// <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>();
            }
        }
Exemplo n.º 3
0
    // 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;
    }
Exemplo n.º 4
0
    // 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;
        }
    }
Exemplo n.º 5
0
 /// <summary>
 /// Initializes the object.
 /// </summary>
 private void Start()
 {
     player    = PlayerPlacer.instance;
     crosshair = GetComponent <Text>();
 }