private IEnumerator showMap ( ShowMapObjectClass objectArgument ) { if ( objectArgument.heighLightMiningNode ) { if ( ! GameGlobalVariables.CUT_DOWN_GAME && FLGlobalVariables.AFTER_LAB_VISIT_02 ) { FLGlobalVariables.AFTER_LAB_VISIT_02 = false; FLMissionTableControl.getInstance ().gameObject.GetComponent < SelectedComponenent > ().setSelectedForUIHighlight ( false ); Camera.main.transform.Find ( "world" ).Find ( "allWorlds" ).Find ( "0" ).Find ( "levels" ).Find ( "level06" ).gameObject.AddComponent < UnlockLevelSequenceManager > (); FLUIControl.getInstance ().transform.Find ( "triggerDialogLabVisit02" ).gameObject.SetActive ( false ); } setCurrentWorld ( 0 ); allWorldsObject.transform.rotation = Quaternion.Euler ( 0f, 180f, 0f ); GameObject haighLightObject = Camera.main.transform.Find ( "world" ).Find ( "allWorlds" ).Find ( "0" ).Find ( "levels" ).Find ( "mining01" ).gameObject; if ( haighLightObject.GetComponent < SelectedComponenent > () == null ) { haighLightObject.AddComponent < SelectedComponenent > ().setSelectedForUIHighlight ( true, 1f ); } else { haighLightObject.GetComponent < SelectedComponenent > ().setSelectedForUIHighlight ( true, 1f ); } if ( haighLightObject.GetComponent < JumpingArrowAbove > () == null ) haighLightObject.AddComponent < JumpingArrowAbove > ().doNotJump = true; } _animationOfMapToLab = true; GameObject blackHole = objectArgument.blackHole; blackHole.SetActive ( true ); blackHole.transform.localPosition = new Vector3 ( 0f, -1.481007f, 4.47f ); if ( objectArgument.onlyzoomout ) blackHole.transform.localScale = new Vector3 ( 0.28f, 0.06f, 0.28f ); else iTween.ScaleTo ( blackHole, iTween.Hash ( "time", 1f, "easetype", iTween.EaseType.easeOutExpo, "scale", new Vector3 ( 0.28f, 0.06f, 0.28f ), "islocal", true )); if ( ! objectArgument.onlyzoomout ) yield return new WaitForSeconds ( 1f ); blackHole.transform.Find ( "cap" ).gameObject.SetActive ( true ); Camera.main.transform.Find ( "world" ).localPosition = new Vector3 ( 0f, 0f, 6f ); blackHole.transform.localPosition = new Vector3 ( 0f, -1.481007f, 4.47f ); yield return new WaitForSeconds ( 0.35f ); blackHole.transform.Find ( "cap" ).gameObject.SetActive ( false ); iTween.ScaleTo ( blackHole, iTween.Hash ( "time", 1f, "easetype", iTween.EaseType.easeOutExpo, "scale", new Vector3 ( 24.84f, 0.06f, 24.84f ), "islocal", true )); yield return new WaitForSeconds ( 1f ); blackHole.transform.localPosition = new Vector3 ( 0f, -1.481007f, 4.47f ); blackHole.SetActive ( false ); _animationOfMapToLab = false; foreach(GameObject moveable in GameObject.FindGameObjectsWithTag("ForMovement")) { moveable.transform.position -= new Vector3 (50, 0, 0 ); } stepCounter ++; }
//*************************************************************// void Awake () { _showMapObject = new ShowMapObjectClass (); //myTempPos = GameObject.Find ("TempBackground"); theLab = GameObject.Find ("Background"); myDefaultPos = GameObject.Find ("DefaultPos"); allWorldsObject = Camera.main.transform.Find ( "world" ).Find ( "allWorlds" ).gameObject; allWorldsObject.transform.Find ( "0" ).Find ( "levels" ).gameObject.SetActive ( true ); GameGlobalVariables.Missions.fillWorldsAndLeveles (); _currentWorldID = SaveDataManager.getValue ( SaveDataManager.WORLD_I_WAS_ON_PREFIX ); _currentWorldOnSign = _currentWorldID; switch ( _currentWorldID ) { case 0: Camera.main.transform.Find ( "world" ).Find ( "sign" ).Find ( "textWorldName" ).GetComponent < GameTextControl > ().myKey = GameGlobalVariables.Missions.WORLDS[0].name; break; case 1: Camera.main.transform.Find ( "world" ).Find ( "sign" ).Find ( "textWorldName" ).GetComponent < GameTextControl > ().myKey = GameGlobalVariables.Missions.WORLDS[1].name; break; case 2: Camera.main.transform.Find ( "world" ).Find ( "sign" ).Find ( "textWorldName" ).GetComponent < GameTextControl > ().myKey = GameGlobalVariables.Missions.WORLDS[2].name; break; } if ( _currentWorldID == 1 ) { rotationYForWorlds = 198 + 1f * 3f; allWorldsObject.transform.rotation = Quaternion.Euler ( new Vector3 ( 0f, 198 + 1f * 3f, 0f )); } else if ( _currentWorldID == 2 ) { rotationYForWorlds = 214f + 3f * 2f; allWorldsObject.transform.rotation = Quaternion.Euler ( new Vector3 ( 0f, 214f + 3f * 2f, 0f )); } if ( AFTER_INTRO || GameGlobalVariables.BLOCK_LAB_ENTERED || GameGlobalVariables.CUT_DOWN_GAME ) { showMissionLevelesScreen ( true, true, true ); } if ( SaveDataManager.keyExists ( SaveDataManager.LEVEL_WAS_UNLOCKED_PREFIX + "5" )) { GameGlobalVariables.BLOCK_LAB_ENTERED = false; } manageMissionsScreen (); }