Beispiel #1
0
 void OnGUI()
 {
     if (shareval.getplayer() == 0)
     {
         imgchar1.GetComponent <Image>().color = new Color32(255, 255, 225, 0);
         imgchar2.GetComponent <Image>().color = new Color32(255, 255, 225, 0);
     }
     if (shareval.getplayer() == 1)
     {
         imgchar1.GetComponent <Image>().color = new Color32(255, 255, 225, 255);
         imgchar2.GetComponent <Image>().color = new Color32(255, 255, 225, 0);
     }
     if (shareval.playersync == 2)
     {
         imgchar1.GetComponent <Image>().color = new Color32(255, 255, 225, 255);
         imgchar2.GetComponent <Image>().color = new Color32(255, 255, 225, 255);
     }
 }
Beispiel #2
0
    void TaskOnClick()
    {
        shareval.Rpcinvissprite();
        shareval.invissprite();
        GameObject.Find("StartLobby").GetComponentInChildren <Text>().text = "Start Battle";
        shareval.RpcLobby();
        shareval.Lobby();
        if (NetworkServer.active)
        {
            if (shareval.getplayer() == 0)
            {
                shareval.Rpcimgoff();
                shareval.imgoff();
            }
            if (shareval.getplayer() == 1)
            {
                shareval.Rpcimg1on();
                shareval.img1on();
            }
            if (shareval.playersync == 2)
            {
                shareval.Rpcimg2on();
                shareval.img2on();
            }
            if (shareval.playersync == 3)
            {
                shareval.Rpcimg3on();
                shareval.img3on();
            }
            if (shareval.playersync == 4)
            {
                shareval.Rpcimg4on();
                shareval.img4on();
            }
        }

        holder = 1;
    }