Example #1
0
 void Start()
 {
     if (Multiplayer)
     {
         scopone = new ScoponeManager();
         scopone.INIT(this);
     }
     else
     {
         scopa = new ScopaManager();
         scopa.Init(this);
         allPlayers = FindObjectsOfType <Entity>();
     }
     tablecards_images = GetComponentsInChildren <Image>();
     //deactive used card images
     foreach (var p in allPlayers)
     {
         //p.UsedCard.enabled = false;
         if (p.isPlayer)
         {
             player = p;
         }
         else
         {
             pc = p;
         }
     }
     playerButtons = player.GetComponentsInChildren <Button>();
     //deactive yellow borders
     foreach (var b in tablecardBorders)
     {
         b.enabled = false;
     }
     //initialize deck and pass this reference
     deck = GetComponentInChildren <DeckController>();
     if (!Multiplayer)
     {
         deck.Init(this);
         currentPlayer = player;
     }
     else
     {
         deck.MultiplayerInit(this, allPlayers);
         scopone.goToNextTurn();
     }
     Scopatxt = GameObject.Find("Scopa");
     Scopatxt.SetActive(false);
 }
Example #2
0
 //init Multiplayer
 public virtual void INIT(ScoponeManager sc)
 {
     hand_images = GetComponentsInChildren <Image>();
     scopone     = sc;
 }