Beispiel #1
0
	// Use this for initialization
	void Start ()
	{
		// DH change
		// Get room that player is in
		var room = RoomManager.getInstance().getRoom(matchID);
		Debug.Log("MC: room id / host name / player_id: " + matchID + " " + room.host + " " + player_id);
		Debug.Log("MC: Number of players: " + room.numPlayers());

		if (GameState.player.GetName () == room.host) {
			host = true;
			Debug.Log ("This player is the host");
		} else {
			host = false;
			Debug.Log ("This player is not the host");
		}

		Game.StartEnterTransition ();
		//to generate converge-ecosystem.txt, remove comments and let protocol run;
		//server will generate txt from sql table
		//NetworkManager.Send(ConvergeEcosystemsProtocol.Prepare(),ProcessConvergeEcosystems);

		//get list of ecosystems
		ReadConvergeEcosystemsFile ();
		//set default ecosystem values
		new_ecosystem_id = Constants.ID_NOT_SET;
		ecosystem_idx = 0;     // Initially set to first ecosystem
		ecosystem_id = GetEcosystemId (ecosystem_idx);
		//get player's most recent prior attempts 
		// DH change - start everyone at beginning to make equal
		// GetPriorAttempts ();
		// Replacement for GetPriorAttempts()
		NoPriorAttempts();

		//create array of ecosystem descriptions
		if (ecosystemList != null) {
			ecosysDescripts = ConvergeEcosystem.GetDescriptions (ecosystemList);
		}
		// GetHints ();
		Debug.Log ("Now in MultiConverge.cs");

		moment = DateTime.Now;
		timeNow = moment.Millisecond;
		Debug.Log ("Time: " + timeNow);
		InitializeBarGraph();
	}
 // Use this for initialization
 void Start()
 {
     Game.StartEnterTransition();
     //get list of ecosystems
     //NetworkManager.Send(ConvergeEcosystemsProtocol.Prepare(),ProcessConvergeEcosystems);
     ReadConvergeEcosystemsFile();
     //set default ecosystem values
     new_ecosystem_id = Constants.ID_NOT_SET;
     ecosystem_idx    = 0;
     ecosystem_id     = GetEcosystemId(ecosystem_idx);
     //get player's most recent prior attempts
     GetPriorAttempts();
     //create array of ecosystem descriptions
     if (ecosystemList != null)
     {
         ecosysDescripts = ConvergeEcosystem.GetDescriptions(ecosystemList);
     }
     GetHints();
 }