Exemplo n.º 1
0
    public void ReturnCards(DistributeType type, DistributeTarget target, int optPlayer)
    {
        List <Player> modifiedList = new List <Player>(Players);

        if (target == DistributeTarget.Exclude)
        {
            modifiedList.RemoveAt(optPlayer);
        }
        else if (target == DistributeTarget.Include)
        {
            modifiedList.Clear(); modifiedList.Add(Players[optPlayer]);
        }

        for (int i = 0; i < modifiedList.Count; i++)
        {
            if (modifiedList[i].isDisconnected)
            {
                continue;
            }
            CoroutinesLauncher.Coroutines.networkView.RPC("ReturnCards",
                                                          modifiedList[i].player,
                                                          optPlayer,
                                                          type == DistributeType.Shown ? true : false);
        }
    }
Exemplo n.º 2
0
    public void Distribute(DistributeType type,
                           DistributeTarget target,
                           int optPlayer,
                           bool returned,
                           Cards toDeal = null,
                           int position = 0)
    {
        List <Player> modifiedList = new List <Player>(Players);

        if (target == DistributeTarget.Exclude)
        {
            modifiedList.RemoveAt(optPlayer);
        }
        else if (target == DistributeTarget.Include)
        {
            modifiedList.Clear();
            modifiedList.Add(Players[optPlayer]);
        }

        for (int i = 0; i < modifiedList.Count; i++)
        {
            if (modifiedList[i].isDisconnected)
            {
                continue;
            }
            if (type == DistributeType.Hidden)
            {
                CoroutinesLauncher.Coroutines.networkView.RPC("DistributeFakeCard",
                                                              modifiedList[i].player,
                                                              optPlayer,
                                                              position,
                                                              returned);
            }
            else
            {
                CoroutinesLauncher.Coroutines.networkView.RPC("DistributeRealCard",
                                                              modifiedList[i].player,
                                                              optPlayer,
                                                              toDeal.Rank,
                                                              (int)toDeal.type, position,
                                                              returned);
            }
        }
    }
Exemplo n.º 3
0
 public Game(string name,
             int id,
             string companyName,
             DateTime release,
             GamesGenre genre,
             SupportedPlatforms platform,
             LicenseType license,
             DistributeType distibution,
             float price,
             float size)
 {
     Category     = CategoryType.GAMES;
     Name         = name;
     Id           = id;
     CompanyName  = companyName;
     ReleaseDate  = release;
     Genre        = genre;
     Platform     = platform;
     License      = license;
     Distribution = distibution;
     Price        = price;
     Size         = size;
 }
Exemplo n.º 4
0
 public void Distribute(DistributeType type)
 {
     // TODO:  ��� ItopVectorControl.Distribute ʵ��
 }
Exemplo n.º 5
0
 public void setDistribution(DistributeType distr)
 {
     Distribution = distr;
 }