Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        setshared();

        if (sharedobj.getIsGameStarted() == true)
        {
            //Debug.Log(sharedobj.getBallsVector3());
            GameObject.Find("mainmenu").SetActive(false);
            //GameObject StartGame_temp = GameObject.Find("StartGame");
            //GameObject.Find("StartGame").SetActive(true);
            setactive_Obj.SetActive(true);
            GameObject.Find("numbernowText").GetComponent <Text>().text = sharedobj.getCurentNumber().ToString();
            GameObject.Find("timernowText").GetComponent <Text>().text  = sharedobj.getTimerForEveryone().ToString();
            //GameObject[] gg = new GameObject[sharedobj.getCountNum()];
            //GameObject gg = new GameObject();
            //gg= sharedobj.getTemp();
            //gg = sharedobj.getBalls();
            Debug.Log(";");
            //GameObject.Find("setting").SetActive(false);
            //GameObject.Find("SetPlayers").SetActive(false);
        }
        //Debug.Log(PlayerPrefs.GetInt("IsGameStarted"));
        //Debug.Log(PlayerPrefs.GetInt("IsGameStarted1"));
        //Debug.Log(sharedobj.getIsGameStarted());
        //if(PlayerPrefs.GetInt("IsGameStarted1") == 1)
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        GameObject gameSharedPreference = GameObject.FindGameObjectWithTag("GameSharedPublic");

        //GameObject gameSharedPreference = GameObject.Find("GameShared");
        sharedobj = gameSharedPreference.GetComponent <AllShared>();
        if (sharedobj.getPlayersCount() != 1)
        {
            StartTime = float.Parse(sharedobj.getTimerForEveryone());
        }
        else
        {
            StartTime = 0;
        }

        TimerText = GameObject.Find("Timer");
    }