// Use this for initialization void Start() { Instance = this; ball = ball_hd; bug = bug_hd; thePrefab.transform.localScale = new Vector3(0.67f, 0.58f, 1); Meshes = GameObject.Find("-Ball"); LevelData.LoadDataFromXML(mainscript.Instance.currentLevel); createMesh(); //LevelData.LoadDataFromLocal(mainscript.Instance.currentLevel); LoadMap(LevelData.map); if (LevelData.mode == ModeGame.Vertical || LevelData.mode == ModeGame.Animals) { MoveLevelUp(); } else { // GameObject.Find( "TopBorder" ).transform.position += Vector3.down * 3.5f; GameObject.Find("TopBorder").transform.parent = null; GameObject.Find("TopBorder").GetComponent <SpriteRenderer>().enabled = false; GameObject ob = GameObject.Find("-Meshes"); ob.transform.position += Vector3.up * 3f; LockLevelRounded slider = ob.AddComponent <LockLevelRounded>(); GamePlay.Instance.GameStatus = GameState.PreTutorial; } Camera.main.GetComponent <mainscript>().connectNearBallsGlobal(); StartCoroutine(getBallsForMesh()); ShowBugs(); }
// public int[][] meshMatrix = new int[15][17]; // Use this for initialization void Awake() { if (InitScript.Instance == null) { gameObject.AddComponent <InitScript>(); } currentLevel = PlayerPrefs.GetInt("OpenLevel", 1); stage = 1; mainscript.StopControl = false; animTable.Clear(); // arcadeMode = InitScript.Arcade; if (Application.platform == RuntimePlatform.WindowsEditor) { //SwitchLianaBoost(); //arcadeMode = true; } creatorBall = GameObject.Find("Creator").GetComponent <creatorBall>(); StartCoroutine(ShowArrows()); StartCoroutine(CheckColors()); }
// Use this for initialization void Start() { Instance = this; sharedVideoManager = VideoManager.getVideoManager(); boxPrefab.transform.localScale = new Vector3(0.67f, 0.58f, 1); Meshes = GameObject.Find("-Ball"); LoadLevel(); if (LevelData.mode == ModeGame.Vertical || LevelData.mode == ModeGame.Animals) { MoveLevelUp(); } else { GameObject.Find("TopBorder").transform.parent = null; GameObject.Find("TopBorder").GetComponent <SpriteRenderer>().enabled = false; GameObject ob = GameObject.Find("-Meshes"); ob.transform.position += Vector3.up * 2.5f; ob.transform.position -= Vector3.left * -.5f; GamePlay.Instance.GameStatus = GameState.PreTutorial; } createMesh(); LoadMap(LevelData.map); Camera.main.GetComponent <mainscript>().connectNearBallsGlobal(); StartCoroutine(getBallsForMesh()); }
// Use this for initialization void Start() { Instance = this; ball = ball_hd; bug = bug_hd; thePrefab.transform.localScale = new Vector3(0.68f, 0.6f, 1); }
// public int[][] meshMatrix = new int[15][17]; void Awake() { //if (LevelCounter.THIS == null) //{ // GameObject gm = new GameObject("LevelCounter"); // gm.AddComponent<LevelCounter>(); //} if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } //Debug.Log(Instance); ballOnLine = new Ball[3]; touchTheBorder = new bool[3]; LevelCounter.levelsCounted++; if (InitScript.Instance == null) { gameObject.AddComponent <InitScript>(); } currentLevel = PlayerPrefs.GetInt("OpenLevel", 1); stage = 1; mainscript.StopControl = false; animTable.Clear(); // arcadeMode = InitScript.Arcade; if (Application.platform == RuntimePlatform.WindowsEditor) { //SwitchLianaBoost(); //arcadeMode = true; } //GameObject.Find("Music").GetComponent<AudioSource>().volume = PlayerPrefs.GetInt("Music"); SoundBase.Instance.GetComponent <AudioSource>().volume = PlayerPrefs.GetInt("Sound"); if (PlayerPrefs.GetInt("Sound") == 0) { SoundBase.Instance.mixer.SetFloat("soundVolume", -80); } else { SoundBase.Instance.mixer.SetFloat("soundVolume", 1); } creatorBall = GameObject.Find("Creator").GetComponent <creatorBall>(); StartCoroutine(ShowArrows()); // StartCoroutine (CheckColors ()); }
void Awake() { if (InitScript.Instance == null) { gameObject.AddComponent <InitScript>(); } currentLevel = PlayerPrefs.GetInt("OpenLevel", 1); stage = 1; mainscript.StopControl = false; animTable.Clear(); creatorBall = GameObject.Find("Creator").GetComponent <creatorBall>(); StartCoroutine(CheckColors()); }
// Use this for initialization void Start() { if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } ball = ball_hd; thePrefab.transform.localScale = new Vector3(0.67f, 0.58f, 1); Meshes = GameObject.Find("-Ball"); //LevelData.LoadDataFromXML(mainscript.Instance.currentLevel); LevelData.LoadLevel((maxrows, maxcols) => { this.maxCols = maxcols; this.maxRows = maxrows; } ); //LevelData.LoadDataFromLocal(mainscript.Instance.currentLevel); if (LevelData.GetTarget() == TargetType.Top || LevelData.GetTarget() == TargetType.RescuePets) { MoveLevelDown(); } else { // GameObject.Find( "TopBorder" ).transform.position += Vector3.down * 3.5f; GameObject.Find("TopBorder").transform.parent = null; GameObject.Find("TopBorder").GetComponent <SpriteRenderer>().enabled = false; GameObject ob = GameObject.Find("-Meshes"); ob.transform.position += Vector3.up * 3f; ob.AddComponent <LockLevelRounded>(); GameEvent.Instance.GameStatus = GameState.PrePlayBanner; } createMesh(); LoadMap(LevelData.map); Camera.main.GetComponent <mainscript>().connectNearBallsGlobal(); StartCoroutine(getBallsForMesh()); // ShowBugs(); }