Beispiel #1
0
 void Start()
 {
     if (this.photonView.isMine)
     {
         PN     = PlayerPrefs.GetInt("PlayerNumber");
         myname = PlayerPrefs.GetString("Name");
     }
     MMS = GameObject.Find("MyManager").GetComponent <MyManagerScript>();
     GameObject.Find("MainCanvas").transform.Find(PN.ToString() + "PStatus").gameObject.SetActive(true);
     statustext      = GameObject.Find(PN.ToString() + "PStatus").transform.Find("Text").gameObject.GetComponent <Text>();
     HPslider        = GameObject.Find(PN.ToString() + "PStatus").transform.Find("HPBar").gameObject.GetComponent <Slider>();
     statustext.text = PN.ToString() + "P:" + myname + ":" + scorepoint.ToString();
     if (PN == 1)
     {
         timertext = GameObject.Find("TimerText").GetComponent <Text>();
     }
 }
Beispiel #2
0
    void Start()
    {
        if (this.photonView.isMine)
        {
            rb   = this.GetComponent <Rigidbody>();
            bc   = this.GetComponent <BoxCollider>();
            renm = main.GetComponent <Renderer>();
            renc = canon.GetComponent <Renderer>();
            renl = catL.GetComponent <Renderer>();
            renr = catR.GetComponent <Renderer>();
            MMS  = GameObject.Find("MyManager").GetComponent <MyManagerScript>();

            for (int i = 1; i <= 3; i++)
            {
                if (PlayerPrefs.GetInt("ItemSet" + i.ToString()) != 0)
                {
                    itemsetnumber[itemsetcount] = PlayerPrefs.GetInt("ItemSet" + i.ToString());
                    itemsetcount++;
                }
            }
        }
    }