// Use this for initialization void Start() { myRigidbody = GetComponent <Rigidbody2D> (); // should we create a gamecontroller for that cameraCont = playerCamera.GetComponent <CameraController>(); pauseCont = GetComponent <PauseController>(); platformCont = platformControllerObject.GetComponent <PlatformController>(); endPlatform = FindObjectOfType <EndPlatformController>().gameObject; hsMuellerController = GetComponent <HSController>(); InitiateMenu(); GlobalstatsIO stats = new GlobalstatsIO(); }
// Start is called before the first frame update void Start() { GameOverScreen.SetActive(false); NameEntry.SetActive(false); GlobalstatsIO.api_id = "X0251Fjn0zp0sDsyOWiXZfnUc2QIdocapfgqUzOV"; GlobalstatsIO.api_secret = "eWBSoaGksDkI1eV44DhtPsS5IjZh8VqnR2ffdVAF"; GridLayout = GetComponent <GridLayoutGroup> (); GlobalStats = new GlobalstatsIO(); lb = GlobalStats.getLeaderboard("leaders", 10); LevelData = new List <Level> (); LevelWords = new Dictionary <Level, List <string> > (); LevelData.Add(new Level { id = 1, rows = 7, cols = 8, x = 1, y = 1, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "TUTORIAL", "LEVEL" }); LevelData.Add(new Level { id = 2, rows = 12, cols = 7, x = 1, y = 1, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "THE", "THEME", "IS", "TERRIBLE" }); LevelData.Add(new Level { id = 3, rows = 12, cols = 7, x = 1, y = 6, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "DAY", "ONE", "TOTAL", "DISASTER" }); LevelData.Add(new Level { id = 4, rows = 10, cols = 8, x = 2, y = 7, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "HAD", "ALMOST", "GIVEN", "UP", "COMPLETELY" }); LevelData.Add(new Level { id = 5, rows = 9, cols = 12, x = 3, y = 2, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "WATCHING", "BIG", "BANG", "THEORY", "ON", "SHOWBOX" }); LevelData.Add(new Level { id = 6, rows = 9, cols = 10, x = 4, y = 5, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "WHEN", "THIS", "IDEA", "CAME", "TOGETHER" }); LevelData.Add(new Level { id = 7, rows = 12, cols = 9, x = 3, y = 5, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "THAT", "WASNT", "UTTERLY", "TERRIBLE" }); LevelData.Add(new Level { id = 8, rows = 8, cols = 7, x = 1, y = 8, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "NOW", "RACE", "AGAINST", "TIME" }); LevelData.Add(new Level { id = 9, rows = 7, cols = 13, x = 6, y = 1, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "TO", "HACK", "SOMETHING", "TOGETHER" }); LevelData.Add(new Level { id = 10, rows = 9, cols = 9, x = 1, y = 8, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "IF", "YOURE", "PLAYING", "THIS" }); LevelData.Add(new Level { id = 11, rows = 8, cols = 10, x = 4, y = 2, isDown = false }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "AND", "COMPLETE", "TWELVE", "LEVELS" }); LevelData.Add(new Level { id = 12, rows = 10, cols = 11, x = 5, y = 4, isDown = true }); LevelWords.Add(LevelData [LevelData.Count - 1], new List <string> { "POST", "HORSE", "TO", "DEMONSTRATE", "GENIUS" }); CurrentLevel = LevelData [CurrentLevelID]; StartTime = DateTime.Now; ClearGrid(); }