コード例 #1
0
ファイル: PlayerId.cs プロジェクト: gafds/RodavortSbgames
    void ReciboMulliganClientRpc(int rn, int rn2)
    {
        var mullig = GameObject.Find("MulliganBackground");

        mullig.GetComponent <Animator>().SetTrigger("Event");
        Mao player = GameObject.Find("Canvas").GetComponent <Mao>();
        PlayerAdversario player2 = GameObject.Find("Canvas").GetComponent <PlayerAdversario>();

        if (!IsOwner)
        {
            mullig.GetComponent <MulliganBehaviour>().CriarCarta(rn);
            player.CriarCartaInicio(rn);
            player2.CriarCarta(rn2);
        }
        else
        {
            mullig.GetComponent <MulliganBehaviour>().CriarCarta(rn2);
            player.CriarCartaInicio(rn2);
            player2.CriarCarta(rn);
        }
        GameObject.Find("Canvas").GetComponent <EventControllerBehaviour>().BotaoInteragivel(IsOwner);
    }
コード例 #2
0
    private void Start()
    {
        testandoNoEditor = false;

        DefinirPlayerIdJogadores();

        PlayerHost.PedidoMulliganHost();
        //botao.transform.GetChild(0).GetComponent<Text>().text = "INICIAR";
        turno = Turnos.DecidirIniciante;

        Inimigo = GetComponent <PlayerAdversario>();
        Player  = GetComponent <Mao>();

        ouroLimite = 10;
        ouroMaximo = 1;

        Player.SetarGold(ouroMaximo);
        Inimigo.SetarGold(ouroMaximo);

        CartasInimigo = transform.GetChild(2).GetComponent <MesaBehaviour>();
        CartasPlayer  = transform.GetChild(1).GetComponent <MesaBehaviour>();

        preparado = true;
    }