public void Start() { game = GameObject.FindWithTag("GameController").GetComponent <GameController>(); multiplayer = GetComponent <Connection>(); viewSystem = GameObject.FindWithTag("GameController").GetComponent <HiddenSystem>(); }
// --------------------------------- Starting Connection ------------------------------------------- // private void Awake() { //--------------------- TESTING MULTIPLAYER ---------------------// //chatlog.text += "\nConnecting to the server"; // Setup Connection PlayerName = PhotonNetwork.LocalPlayer.NickName; // Connecting using Photon settings PhotonNetwork.ConnectUsingSettings(); game = GameObject.FindWithTag("GameController").GetComponent <GameController>(); hiddenSys = game.GetComponent <HiddenSystem>(); photonView = GetComponent <PhotonView>(); }
void Start() { //Board mapping xBoard = new Dictionary <float, int>(); yBoard = new Dictionary <float, int>(); turn = BattleSystem.START; // Assigning Scripts _movement = GameObject.FindWithTag("Movement").GetComponent <Movement>(); multiplayer = GameObject.FindWithTag("Multiplayer").GetComponent <Connection>(); view = this.GetComponent <HiddenSystem>(); // DELETE FOLLOWING CODE // USED WHILE DEVELOPMING THE GAME //GameObject.Find("Multiplayer").SetActive(false); //gameModeMultiplayer = false; //UNCOMMENT THE FOLLOWING CODE //USED TO CHECK IF GAME IS LOCAL OR MULTIPLAYER *AFTER* THE MAIN MENU SCENE // Checking GameMode selected on MainMenu (Local or Multiplayer) if (GameObject.Find("BackGround").GetComponent <DontDestroy>().localGameMode == true) { GameObject.Find("Multiplayer").SetActive(false); gameModeMultiplayer = false; } else { gameModeMultiplayer = true; //multiplayer = GameObject.FindWithTag("Multiplayer").GetComponent<Connection>(); } //Adding delay when changing the turn gameSetup(); //Delay the beginning of the first player turn = BattleSystem.NAZGUL; nazgulTurn(); }