Exemplo n.º 1
0
    private Agent[] showFirstAgents(AllDecks decks)
    {
        Agent[] agents = new Agent[2];
        for (int i = 0; i < 2; i++)
        {
            agents[i] = decks.getAgentDeck().First.Value;
            decks.getAgentDeck().RemoveFirst();
        }

        buttonImageAgentL = GameObject.Find("ChooseAgent/AgentL").GetComponent <Button>();
        buttonImageAgentR = GameObject.Find("ChooseAgent/AgentR").GetComponent <Button>();
        buttonImageAgentL.image.sprite = Resources.Load <Sprite>("Agents/" + agents[0].getAgentName().ToString().ToLower());
        buttonImageAgentR.image.sprite = Resources.Load <Sprite>("Agents/" + agents[1].getAgentName().ToString().ToLower());
        Console.WriteLine("ABCDE");
        return(agents);
    }
Exemplo n.º 2
0
    /* CPUへの初期エージェント・手札の配布 */
    public List <Player> firstDealforCPU(AllDecks decks, int numCPUs)
    {
        List <Player>       cPUs = new List <Player>();
        List <StrategyCard> hands;

        for (int i = 0; i < numCPUs; i++)
        {
            hands = new List <StrategyCard>();
            for (int j = 0; j < 3; j++)
            {
                hands.Add(decks.getStrategyDeck().First.Value);
                decks.getStrategyDeck().RemoveFirst();
            }
            cPUs.Add(new Player(false, decks.getSideDeck().First.Value, decks.getAgentDeck().First.Value, hands));
            decks.getSideDeck().RemoveFirst();
            decks.getAgentDeck().RemoveFirst();
        }
        return(cPUs);
    }