void Start() { PersistantValues.Load(); toast.AndroidToast("App by Atharva Khare"); }
public void LoginButtonClick() { string password = PasswordInput.text; PersistantValues.puzzleName = ""; string stk; stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.jigsawPuzzleName1); stk = stk.Substring(0, 6); Toast toast2 = new Toast(); displayPassword.text = "Jigsaw 1: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.jigsawPuzzleName1; PersistantValues.puzzleNumber = 0; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.jigsawPuzzleName2); stk = stk.Substring(0, 6); displayPassword.text += "\nJigsaw 2: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.jigsawPuzzleName2; PersistantValues.puzzleNumber = 1; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.jigsawPuzzleName3); stk = stk.Substring(0, 6); displayPassword.text += "\nJigsaw 3: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.jigsawPuzzleName3; PersistantValues.puzzleNumber = 2; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.riddle1); stk = stk.Substring(0, 6); displayPassword.text += "\nRiddle 1: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.riddle1; PersistantValues.puzzleNumber = 6; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.riddle2); stk = stk.Substring(0, 6); displayPassword.text += "\nRiddle 2: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.riddle2; PersistantValues.puzzleNumber = 7; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.riddle3); stk = stk.Substring(0, 6); displayPassword.text += "\nRiddle 3: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.riddle3; PersistantValues.puzzleNumber = 8; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.fourPicPuzzleName1); stk = stk.Substring(0, 6); displayPassword.text += "\nFourPic 1: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.fourPicPuzzleName1; PersistantValues.puzzleNumber = 3; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.fourPicPuzzleName2); stk = stk.Substring(0, 6); displayPassword.text += "\nFourPic 2: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.fourPicPuzzleName2; PersistantValues.puzzleNumber = 4; } stk = Crypto.Md5Sum(PersistantValues.currentTeam.UserID + PersistantValues.currentTeam.Name + PersistantValues.currentTeam.fourPicPuzzleName3); stk = stk.Substring(0, 6); displayPassword.text += "\nFourPic 3: " + stk; if (stk == password) { PersistantValues.puzzleName = PersistantValues.currentTeam.fourPicPuzzleName3; PersistantValues.puzzleNumber = 5; } if (PersistantValues.puzzleName == "") { Toast toast = new Toast(); toast.AndroidToast("Invalid password"); } else { if (PersistantValues.puzzleNumber >= 0 && PersistantValues.puzzleNumber <= 2) { SceneManager.LoadScene("TestScene0", LoadSceneMode.Single); } if (PersistantValues.puzzleNumber >= 3 && PersistantValues.puzzleNumber <= 5) { SceneManager.LoadScene("FourPic", LoadSceneMode.Single); } if (PersistantValues.puzzleNumber >= 6 && PersistantValues.puzzleNumber <= 8) { SceneManager.LoadScene("RiddleScene", LoadSceneMode.Single); } else { Debug.Log("Scene error"); } } }