コード例 #1
0
	void Awake(){
		inLobby = true;
		//MasterServer.ipAddress = "38.104.224.202";
		//Important
        playbtn = GameObject.Find("playBtn");
        hudTools = GetComponent<HUDTools>();
		if(SessionManager.Instance == null){
			Transform manager = (Transform)Instantiate (sessionManagerPrefab, sessionManagerPrefab.position, Quaternion.identity);
			sessionManager = manager.GetComponent<SessionManager>();
		}
		else
			sessionManager = SessionManager.Instance;
    }
コード例 #2
0
	void Awake(){
		if(GameObject.Find("LobbyGUI") != null){
			
			sessionManager = SessionManager.Instance;
			FindPlatforms();
			beginTime = float.PositiveInfinity;
			
			playerSpawnVectors = new List<Vector3>();
			
			foreach(Transform location in spawnPositions){
				playerSpawnVectors.Add(location.position);
			}
			hudTools = GetComponent<HUDTools>();
			playersReady = new List<NetworkPlayer>();
			allTimedSpawns = new HeapPriorityQueue<PowerSpawn>(30);
			
			
			powerPrefabs = GetComponent<PowerPrefabs>();
			GameObject placementRoot = Instantiate(placementRootPrefab, 
			                                       placementRootPrefab.transform.position, Quaternion.identity) as GameObject;
			placementUI = placementRoot.GetComponent<PlacementUI>();
			placementUI.Initialize(powerPrefabs);
			placementUI.SwitchToLive(false);
			placementUI.Enable();
		} 
	}
コード例 #3
0
	void Awake(){

		sessionManager = SessionManager.Instance;
		sessionManager.psInfo.LevelReset();
		
		playerSpawnVectors = new List<Vector3>();

		foreach(Transform location in spawnPositions){
			playerSpawnVectors.Add(location.position);
		}
		hudTools = GetComponent<HUDTools>();
		playersReady = new List<NetworkPlayer>();
		allTimedSpawns = new HeapPriorityQueue<PowerSpawn>(30);


		powerPrefabs = GetComponent<PowerPrefabs>();
		GameObject placementRoot = Instantiate(placementRootPrefab, 
		                                       placementRootPrefab.transform.position, Quaternion.identity) as GameObject;
		placementUI = placementRoot.GetComponent<PlacementUI>();
		timer = GameObject.Find("timer").GetComponent<Timer>();
		timer.Hide();

		ScoreUI scoreUI = placementRoot.GetComponent<ScoreUI>();
		scoreUI.Initialize(sessionManager.psInfo);

		livesUI = placementRoot.GetComponent<LivesUI>();
		livesUI.Initialize(sessionManager.psInfo, sessionManager.psInfo.livesPerRound);

		pointTracker = GetComponent<PointTracker>();
		pointTracker.Initialize(scoreUI);


	}
コード例 #4
0
	void Awake(){
		SessionManager sessionManager = SessionManager.Instance;
		psInfo = sessionManager.psInfo;
		hudTools = GetComponent<HUDTools>();
	}