private void Start() { _sortingOrderInit = GetComponent <Canvas>().sortingOrder; _startPosition = transform.position; _playerManager = GameObject.FindGameObjectWithTag("PlayerManager").GetComponent <PlayerManager>(); _zonePlayableManager = GameObject.FindGameObjectWithTag("ZonePlayableManager").GetComponent <ZonePlayableManager>(); _dragDropManager = GameObject.FindGameObjectWithTag("DragDropManager").GetComponent <DragDropManager>(); _gameManager = GameObject.FindGameObjectWithTag("Manager").GetComponent <GameManager>(); _defausseCardManger = GameObject.FindGameObjectWithTag("DefausseCardManager").GetComponent <DefausseCardManager>(); if (AgeEnCours == 1) { CardEffectAge4 = GameObject.FindGameObjectWithTag("CardEffectAge1"); } else if (AgeEnCours == 2) { CardEffectAge5 = GameObject.FindGameObjectWithTag("CardEffectAge2"); } else { CardEffectAge6 = GameObject.FindGameObjectWithTag("CardEffectAge3"); } }
void Start() { _cardFace = CarteFaceManager.GetComponent <CarteFaceManager>().CardFace; _cardBack = CarteFaceManager.GetComponent <CarteFaceManager>().CardBack; Cards = CarteFaceManager.GetComponent <CarteFaceManager>().Cards; PlayerManager = GameObject.FindGameObjectWithTag("PlayerManager").GetComponent <PlayerManager>(); // instructionText = GameObject.FindGameObjectWithTag("InstructionText"); _zonePlayableManager = GameObject.FindGameObjectWithTag("ZonePlayableManager").GetComponent <ZonePlayableManager>(); if (AgeEnCours == 3) { _cardBackGuilde = CarteFaceManager.GetComponent <CarteFaceManager>().CardBackGuildes; _cardFaceGuilde = CarteFaceManager.GetComponent <CarteFaceManager>().CardFaceGuildes; ShuffleCardFace(); InitializeCardsAge3(); } else { ShuffleCardFace(); InitializeCards(); } if (AgeEnCours != 2 && AgeEnCours != 3) { return; } if (PlayerManager.Player.DestroyRessourcePrimaire || PlayerManager.Player.DestroyRessourceSecondaire || PlayerManager.Player.Defausse || PlayerManager.Player.JetonRestant) { if (PlayerManager.Player.Defausse) { SceneManager.LoadScene("Defausse"); } if (PlayerManager.Player.JetonRestant) { SceneManager.LoadScene("SelectionToken"); } GameObject.FindGameObjectWithTag("hideShowAllCards").GetComponent <HideShowAllCards>() .hideShowAllCards(false, true); } else { NextPlayerEndAge(); SceneManager.LoadScene("SelectionAvatar"); GameObject.FindGameObjectWithTag("hideShowAllCards").GetComponent <HideShowAllCards>() .hideShowAllCards(false, true); } }
private void Start() { _zonePlayableManager = GameObject.FindGameObjectWithTag("ZonePlayableManager").GetComponent <ZonePlayableManager>(); _dragDropManager = GameObject.FindGameObjectWithTag("DragDropManager").GetComponent <DragDropManager>(); }