예제 #1
0
 public void ComputeDisplay()
 {
     Clean();
     foreach (Player player in PhotonNetwork.CurrentRoom.Players.Values)
     {
         RoomUnit unit = Instantiate(ru, target);
         allObjects.Add(unit);
         unit.SetText(player.NickName);
     }
 }
예제 #2
0
 public override void Init()
 {
     base.Init();
     foreach (Player plyr in PhotonNetwork.CurrentRoom.Players.Values.OrderByDescending(x => x.CustomProperties["Score"]))
     {
         RoomUnit ru = Instantiate(prefab, trsf);
         ru.SetText(plyr.NickName + " : " + plyr.CustomProperties["Score"]);
         allRoomUnit.Add(ru);
     }
     StartCoroutine(Restart());
 }
예제 #3
0
    public override void Init()
    {
        base.Init();
        float ratio = 0;

        img.sprite         = databank.sprt;
        fitter.aspectRatio = databank.ratio;

        foreach (string str in Manager.GetInstance().choices.Keys)
        {
            RoomUnit roomu = Instantiate(ru, target);
            roomu.SetText(str);
            units.Add(roomu);
        }
    }
예제 #4
0
    public override void Init()
    {
        base.Init();

        if (Manager.GetInstance().IsDeciding)
        {
            dontChose.SetActive(false);
            float ratio = 0;
            img.sprite         = databank.sprt;
            fitter.aspectRatio = databank.ratio;
            foreach (string txt in Manager.GetInstance().choices.Keys)
            {
                RoomUnit ru = Instantiate(prefab, target);
                ru.SetText(txt);
                ru.GetComponent <Button>().onClick.AddListener(() => Manager.GetInstance().Chose(ru.GetText()));
                allObjs.Add(ru);
            }
        }
        else
        {
            chose.SetActive(false);
        }
    }