Beispiel #1
0
    //void OnGUI()
    //{
    //    if (GUI.Button(new Rect(120, 10, 100, 20), "distribute"))
    //    {
    //        initSources();
    //        hands = GetComponent<Hands>();
    //        distribute();
    //        Center();
    //        foreach (GameObject source in sources)
    //        {
    //            source.name = "Card" + source.GetComponent<CardModel>().cardIndex;
    //        }
    //    }
    //}

    public void StartGame()
    {
        initSources();
        hands = GetComponent <HandsOnline>();
        distribute();
        Center();
        foreach (GameObject source in sources)
        {
            source.name = "Card" + source.GetComponent <CardModel>().cardIndex;
        }
        zizikaku = GameObject.Find("GameManager").GetComponent <ZiziKakuOnline>();
    }
Beispiel #2
0
 void get()
 {
     gameManager    = GameObject.Find("GameManager");
     draw           = gameManager.GetComponent <DrawOnline>();
     turnManager    = gameManager.GetComponent <TurnManagerOnline>();
     turnPlayer     = turnManager.turnPlayer;
     drawnPlayer    = turnManager.drawnPlayer;
     preDrawnPlayer = turnManager.preDrawnPlayer;
     drawnCard      = turnManager.drawnCard;
     hand           = GameObject.Find("Hand"); //Handのクラスを取得
     hands          = hand.GetComponent <HandsOnline>();
     cardModel      = GetComponent <CardModel>();
     cardIndex      = cardModel.cardIndex; //カードモデルからcardIndexを取得
     zizikaku       = gameManager.GetComponent <ZiziKakuOnline>();
 }
Beispiel #3
0
 private void get()
 {
     //card = GameObject.Find("Card");
     turnManager = GetComponent <TurnManagerOnline>();
     record      = GetComponent <RecordOnline>();
     turn        = turnManager.turn;
     tP          = turnManager.turnPlayer;
     dP          = turnManager.drawnPlayer;
     hand        = GameObject.Find("Hand"); //Handのクラスを取得
     hands       = hand.GetComponent <HandsOnline>();
     md          = GameObject.Find("ModeData").GetComponent <ModeData>();
     zizikaku    = GetComponent <ZiziKakuOnline>();
     for (int i = 0; i < 4; i++)
     {
         coms[i] = GameObject.Find("Com" + (i)).GetComponent <ComputerVer2Online>();
         //Debug.Log("Com" + (i + 1));
     }
 }