Beispiel #1
0
    public static string maxplayer = string.Empty; //최대 입찰자
    #endregion

    // Use this for initialization
    void Start()
    {
        lconstructor = GameObject.Find("LandConstructor").GetComponent <LandConstructor>();
        cmanager     = GameObject.Find("CardManager").GetComponent <CardManager>();
        startbutton  = GameObject.Find("StartButton");
        endbutton    = GameObject.Find("TurnEnd");
        endbutton.SetActive(false);
        oplayerbutton = GameObject.Find("OtherPlayersButton");
        oplayerbutton.SetActive(false);
        ainfobutton = GameObject.Find("AuctionInfoButton");
        ainfobutton.SetActive(false);
        playerfield = GameObject.Find("PField");
        help        = GameObject.Find("Help");
        help.transform.Find("Scrollbar Vertical").GetComponent <Scrollbar>().value = 1;
        help.SetActive(false);
        chatfield  = GameObject.Find("ChatField");
        turnpname  = "";
        systemtext = GameObject.Find("SystemText").GetComponent <Text>();
        turntext   = GameObject.Find("TurnText").GetComponent <Text>();
        roundtext  = GameObject.Find("RoundText").GetComponent <Text>();
        IsGame     = false;
        //IsAuction = true;
        //IsSelect = false;
        pinfo = new PlayerInfo[PhotonNetwork.playerList.Length];
        price = 0;
        lnum  = -1;

        //처음 위치 저장
        AInfopos = auctiontext.transform.parent.position;

        InitPlayer();

        if (players.Length == 1 || !PhotonNetwork.isMasterClient)
        {
            startbutton.SetActive(false);
        }

        IsPlayersPlayingCard = new bool[players.Length];
        for (int i = 0; i < pinfo.Length; i++)
        {
            IsPlayersPlayingCard[i] = true;
        }
        if (PhotonNetwork.isMasterClient)
        {
            lconstructor.ChangeSource();
            playersprice = new int[players.Length];
            source       = lconstructor.GetSource();//현재 경매에 나온 자원을 받아옴.
            SendSAuction(PhotonTargets.All, source.SourceName, source.SourceMoney);
        }
    }
Beispiel #2
0
 void RestartAuction()
 {
     lconstructor.ChangeSource();
     source = lconstructor.GetSource();
     SendSAuction(PhotonTargets.All, source.SourceName, source.SourceMoney);
 }