// Use this for initialization void Start() { // On doit attendre que tous les joueurs soient prêts avant de pouvoir lancer une carte confirmCardButton.interactable = false; areAllCardsDistributed = false; numberOfPlayersInTheGame = Prototype.NetworkLobby.LobbyPlayerList.numberOfPlayerInTheRoom; playersInGame = new List <GameObject>(GameObject.FindGameObjectsWithTag("player")); if (isServer) { StartCoroutine(WaitFewSecondsBeforeDistribuingCards()); } if (isLocalPlayer) { //permet d'afficher uniquement ceux qui appartient au joueur local playerElements.SetActive(true); isGameOver = false; addPossibilityToChooseCharacterButtons(); deactivateAllUselessCanvasForTheBeginning(); //Initialisation du deck de cartes du joueurs local cardsDeckScriptFromThePlayer.loadCards(); myHealth = GetComponent <ComputerHealth>(); } }
float timer; //Timer which regulates time between attacks /* * The Awake function finds the computer with the tag passed in as an argument in the inspector. * Its ComputerHealth script is also retrieved. */ void Awake() { computer = GameObject.FindGameObjectWithTag(attack); computerHealth = computer.GetComponent <ComputerHealth> (); }