示例#1
0
	IEnumerator Start(){
		soundManager=SoundManager._instance;
		uiManager=UIManager._instance;
		saveDataManager=SaveDataManager.instance_;
		volcanoEyeManager=VolcanoEyeManager._instance;

		endText.SetActive(false);

		yield return new WaitForSeconds (0.5f);

		while( true ){
			if (Input.GetMouseButtonDown (0)) {
				print("preiosno");
				break;
			}
			yield return 0;
		}

		instance = this;
		for( int i = 0; i < spawnPointsParent.transform.childCount; i++){
			spawnPoints.Add( spawnPointsParent.transform.GetChild(i));
		}
		currentLives = lives;
		personPrefab = Resources.Load ("PersonPrefab") as GameObject;
		loadGame();

	}
示例#2
0
	// Use this for initialization
	void Awake () {
		_instance=this;
	}
示例#3
0
	IEnumerator Start(){
        currentTime = maxTime;
        
		soundManager =SoundManager._instance;
		volcanoEyeManager=VolcanoEyeManager._instance;
		particleManager=ParticleManager._instance;
		saveDataManager=SaveDataManager._instance;

		savedLavaPosition=lavaSprite.transform.localPosition;
        savedSkyColor = skySprite.color;

		endText.SetActive(false);

		yield return new WaitForSeconds (0.5f);

		while( true ){
			if (Input.GetMouseButtonDown (0)) {
				if(challengeType==ChallengeType.TIME){
					StartCoroutine(UpdateTimeCoroutine());
				}
				break;
			}



			yield return 0;
		}



		instance = this;
		for( int i = 0; i < spawnPointsParent.transform.childCount; i++){
			spawnPoints.Add( spawnPointsParent.transform.GetChild(i));
		}
        for (int i = 0; i < personOriginPointsParent.transform.childCount; i++)
        {
            originPoints.Add(personOriginPointsParent.transform.GetChild(i));
        }
        for (int i = 0; i < jumpPointsParent.transform.childCount; i++)
        {
            jumpPoints.Add(jumpPointsParent.transform.GetChild(i));
        }
        currentLives = lives;
		personPrefab = Resources.Load ("PersonPrefab") as GameObject;
		loadGame();

	}