コード例 #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
ファイル: Result.cs プロジェクト: SeverinM/CardsAgainstArts
    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);
        }
    }