Exemple #1
0
    // RaiseEvent
    private void PhotonNetwork_OnEventCall(byte eventCode, object content, int senderId)
    {
        if (this == null)
        {
            return;
        }

        if (eventCode.Equals(0))
        {
            object[] datas = content as object[];
            if (datas.Length.Equals(4))
            {
                // 같은팀만 받음 (같은팀만 스펠이 보여야하니)
                if (PhotonNetwork.player.GetTeam().ToString().Equals((string)datas[1]))
                {
                    slg = GameObject.FindGameObjectWithTag("RedTeamLayout").GetComponent <SelectionLayoutGroup>();
                    foreach (SelectListing Prefab in slg.selectListings)
                    {
                        // 해당 유저찾아서 몇번에 무슨스펠 적용하라고 함수보냄
                        if (Prefab.PhotonPlayer.NickName == (string)datas[0])
                        {
                            Prefab.GetComponent <SpellSelect>().Spell_Image((string)datas[2], (string)datas[3]);
                            break;
                        }
                    }
                }
            }
        }
    }
    void Start()
    {
        selectionLayoutGroup = GameObject.FindGameObjectWithTag("RedTeamLayout").GetComponent <SelectionLayoutGroup>();
        // 타이머연동 RaiseEvent 등록
        PhotonNetwork.OnEventCall += TimerShare;

        if (SoundManager.Instance != null)
        {
            SoundManager.Instance.SelectionRoom_Start_Sound();
        }
    }
Exemple #3
0
    private void Start()
    {
        if (PhotonPlayer.IsLocal)
        {
            GetComponent <Image>().color = new Color(233f / 255f, 192f / 255f, 49f / 255f, 1);
            TimerText.SetActive(true);
        }

        gameObject.name    = PhotonPlayer.NickName;
        ChampNameText.text = "선택중...";
        selectionManager   = GameObject.FindGameObjectWithTag("SelectionManager").GetComponent <SelectionManager>();
        slg = GameObject.FindGameObjectWithTag("RedTeamLayout").GetComponent <SelectionLayoutGroup>();
    }
Exemple #4
0
 // Use this for initialization
 void Start()
 {
     slg = GameObject.FindGameObjectWithTag("RedTeamLayout").GetComponent <SelectionLayoutGroup>();
     // 타이머연동 RaiseEvent 등록
     PhotonNetwork.OnEventCall += TimerShare;
 }
 private void Start()
 {
     championButton       = GetComponent <Button>();
     selectRoom           = GameObject.FindGameObjectWithTag("SelectRoom");
     selectionLayoutGroup = GameObject.FindGameObjectWithTag("RedTeamLayout").GetComponent <SelectionLayoutGroup>();
 }