Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (Application.loadedLevel == 3)
     {
         if (!flowchartManager.GetBooleanVariable("istalking"))
         {
             DB.cango = true;
         }
     }
     if (Application.loadedLevel == 2)
     {
         if (!flowchartManager2.GetBooleanVariable("istalking"))
         {
             DB.cango = true;
         }
     }
     if (Application.loadedLevel == 2)
     {
         if (flowchartManager2.GetBooleanVariable("jump"))
         {
             DB.firstEnter      = false;
             DB.startgame2      = true;
             DB.leader_position = new Vector3((float)-0.05976188, (float)-4.370385, 0);
             //human.transform.position = DB.leader_position;
             //human.GetComponent<Animator>().SetFloat("MoveX", DB.leader_direction.x);
             //human.GetComponent<Animator>().SetFloat("MoveY", DB.leader_direction.y);
             Application.LoadLevel(3);
         }
     }
 }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        startDrinkGame   = flowchart.GetBooleanVariable("startDrinkGame");
        startClothesGame = flowchart.GetBooleanVariable("startClothesGame");
        drinkCounter     = DrinkArea.drinkCounter;
        clothesCounter   = DrinkArea.clothesCounter;

        if (startDrinkGame == true && drinkCounter < 7)
        {
            playSpace.SetActive(true);
        }
        else if (startClothesGame == true && clothesCounter < 3)
        {
            playSpace.SetActive(true);
        }
        else
        {
            playSpace.SetActive(false);
        }

        if (drinkCounter == 7 && startDrinkGame == true)
        {
            //flowchart.ExecuteBlock("Final Dialogue");
            startDrinkGame = false;
        }

        if (clothesCounter == 3)
        {
            flowchart.ExecuteBlock("Need Weapon");
            axe.GetComponent <BoxCollider2D>().enabled = true;
            exitHouse.SetActive(true);
        }
    }
    // Update is called once per frame
    void Update()
    {
        bl_conversationEnd = FungusFlow.GetBooleanVariable("bl_textCycleOver");
        bl_AcceptedTask    = FungusFlow.GetBooleanVariable("bl_accepted");

        CheckConversationLoop();
    }
Esempio n. 4
0
 void getFlowchartNums()
 {
     skillsNum      = flowchart.GetIntegerVariable("SkillsNum");
     firstProblem   = flowchart.GetBooleanVariable("FirstProblem");
     inExam         = flowchart.GetBooleanVariable("InExam");
     currentProblem = flowchart.GetIntegerVariable("CurrentProblem");
 }
Esempio n. 5
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.E) && triggering)
        {
            activado = true;
            if (!personajeActivado)
            {
                hernesto.gameObject.SetActive(true);
            }

            else
            {
                if (hernesto.GetBooleanVariable("finalBueno"))
                {
                    hernestoBueno.gameObject.SetActive(true);
                }

                else if (hernesto.GetBooleanVariable("finalNeutro"))
                {
                    hernestoNeutro.gameObject.SetActive(true);
                }

                else if (hernesto.GetBooleanVariable("finalMalo"))
                {
                    hernestoMalo.gameObject.SetActive(true);
                }
            }
        }
    }
Esempio n. 6
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable("allAnswerRight") == true)
     {
         Give_hero_3();
     }
 }
Esempio n. 7
0
 void getFlowchartNums()
 {
     firstProblem   = flowchart.GetBooleanVariable("FirstProblem");
     currentProblem = flowchart.GetIntegerVariable("CurrentProblem");
     inExam         = flowchart.GetBooleanVariable("InExam");
     examLast       = flowchart.GetBooleanVariable("ExamLast");
     examScore      = flowchart.GetFloatVariable("ExamScore");
 }
Esempio n. 8
0
    // Update is called once per frame
    void Update()
    {
        allowMovement = flowchart.GetBooleanVariable("allowMovement");
        drinkReady    = flowchart.GetBooleanVariable("drinkReady");
        isRunning     = flowchart.GetBooleanVariable("isRunning");

        Move();
        SetDrinkPose();
    }
Esempio n. 9
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart)
     {
         if (!flowchart.GetBooleanVariable("negotiating") && inCombat)
         {
             FillStamina();
         }
     }
 }
Esempio n. 10
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable(questcomplete))
     {
         transform.parent.gameObject.SetActive(false);
     }
     if (flowchart.GetBooleanVariable("End"))
     {
         pc.canMove = true;
         flowchart.SetBooleanVariable("End", false);
         pause.enabled = true;
         pause.gameObject.SetActive(true);
     }
 }
Esempio n. 11
0
    // Update is called once per frame
    void Update()
    {
        startDrinkGame   = flowchart.GetBooleanVariable("startDrinkGame");
        startClothesGame = flowchart.GetBooleanVariable("startClothesGame");

        if (startDrinkGame == true)
        {
            drinkGame();
        }

        if (startClothesGame == true)
        {
            clothesGame();
        }
    }
Esempio n. 12
0
    // Update is called once per frame
    void Update()
    {
        if (Application.loadedLevel == 3)
        {
            if (!flowchartManager.GetBooleanVariable("istalking"))
            {
                DB.cango = true;
            }
        }

        if (flowchartManager.GetBooleanVariable("jump"))
        {
            SceneManager.LoadScene(4);
        }
    }
Esempio n. 13
0
    // Update is called once per frame
    void Update()
    {
        if (flowchart != null)
        {
            if (flowchart.GetBooleanVariable(fungusVar))
            {
                img.enabled = true;
            }

            else if (!flowchart.GetBooleanVariable(fungusVar))
            {
                img.enabled = false;
            }
        }
    }
    public void SaveInSlot(string saveName)
    {
#if UNITY_ANDROID && !UNITY_EDITOR
        path = Path.Combine(Application.persistentDataPath, saveName + ".json");
#else
        Directory.CreateDirectory(Application.dataPath + "/saves");
        path = Path.Combine(Application.dataPath + "/saves/", saveName + ".json");
#endif
        sv.sceneName  = SceneManager.GetActiveScene().name;
        sv.playerName = myFlowchart.GetStringVariable("Name");
        sv.prologEnd  = myFlowchart.GetBooleanVariable("PrologEnd");
        sv.dayTime    = myFlowchart.GetIntegerVariable("Time");
        sv.money      = myFlowchart.GetIntegerVariable("Money");

        sv.kateAlpha   = myFlowchart.GetIntegerVariable("KateAlpha");
        sv.katePretty  = myFlowchart.GetIntegerVariable("KatePretty");
        sv.klaraAlpha  = myFlowchart.GetIntegerVariable("KlaraAlpha");
        sv.klaraPretty = myFlowchart.GetIntegerVariable("KlaraPretty");
        sv.lizzyAlpha  = myFlowchart.GetIntegerVariable("LizzyAlpha");
        sv.lizzyPretty = myFlowchart.GetIntegerVariable("LizzyPretty");
        sv.saraAlpha   = myFlowchart.GetIntegerVariable("SaraAlpha");
        sv.saraPretty  = myFlowchart.GetIntegerVariable("SaraPretty");

        sv.saveDateTime = System.DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");

#if UNITY_ANDROID && !UNITY_EDITOR
        File.WriteAllText(path, JsonUtility.ToJson(sv));
#endif
        File.WriteAllText(path, JsonUtility.ToJson(sv));
    }
Esempio n. 15
0
 void Update()
 {
     if (fc.GetBooleanVariable("isOver") == true)
     {
         mouseOn = false;
     }
 }
Esempio n. 16
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable(talkedToNPC)) //"talkedToDingo"
     {
         speechBubble.SetActive(false);             // Disables the speech bubble once the player has talked to a specific NPC
     }
 }
Esempio n. 17
0
    //When the hero arrives
    private void HeroArrival()
    {
        hero.SetActive(true);
        if (BL_Converse)
        {
            StartCoroutine(Entry());
            BL_Converse = false;
        }

        if (flowchart.GetBooleanVariable("bl_heroDialogue") == true)
        {
            CurrentState = InteractionState.Minigame;
            BL_Converse  = true;
            flowchart.SetBooleanVariable("bl_heroDialogue", false);
        }
    }
Esempio n. 18
0
    public void LeaveScene()
    {
        infoDump.droneSpeed  = talkFlowchart.GetIntegerVariable("DroneSpeed");
        infoDump.phobosPower = talkFlowchart.GetIntegerVariable("PhobosPower");
        infoDump.deimosPower = talkFlowchart.GetIntegerVariable("DeimosPower");
        infoDump.fuelRegen   = talkFlowchart.GetIntegerVariable("FuelRegen");

        infoDump.hasQInfo           = talkFlowchart.GetBooleanVariable("HasQInfo");
        infoDump.hasQAdvice         = talkFlowchart.GetBooleanVariable("HasQAdvice");
        infoDump.weaponSystemStatus = talkFlowchart.GetStringVariable("WeaponsStatus");

        infoDump.talkedToQ     = talkFlowchart.GetBooleanVariable("TalkedToQ");
        infoDump.talkedToAresa = talkFlowchart.GetBooleanVariable("TalkedToAresa");
        infoDump.talkedToPD    = talkFlowchart.GetBooleanVariable("TalkedToPD");
        SceneManager.LoadScene("PaulScene", LoadSceneMode.Single);
    }
Esempio n. 19
0
 // Update is called once per frame
 void Update()
 {
     if (flowchartEnd.GetBooleanVariable("endGame"))
     {
         Initiate.Fade("theEnd", loadToColor, 1.0f);
     }
 }
Esempio n. 20
0
    private void Update()
    {
        if (Input.GetButtonDown("Cancel"))
        {
            PauseUnpause();
        }

        if (!firstDialog.GetBooleanVariable("firstStory") && !firstStoryPassed)
        {
            battery.SetActive(true);
            flashlightDialog.gameObject.SetActive(true);
            if (!flashlightDialog.GetBooleanVariable("flashlightDialog"))
            {
                isGameRunning = true;
                sanityBar.SetActive(true);
                firstStoryPassed = true;
            }
        }

        if (!isGameRunning)
        {
            if (!dialog.DialogIsActive())
            {
                dialog.bookDialog.gameObject.SetActive(false);
                dialog.diaryDialog.gameObject.SetActive(false);
                dialog.photoDialog.gameObject.SetActive(false);
                dialog.candleDialog.gameObject.SetActive(false);
                dialog.activeCandleDialog.gameObject.SetActive(false);
                dialog.petunjukDialog.gameObject.SetActive(false);
                isGameRunning = true;
            }
        }
    }
Esempio n. 21
0
 // Update is called once per frame
 void Update()
 {
     if (endingFlowchart.GetBooleanVariable("end"))
     {
         SceneManager.LoadScene("Menu");
     }
 }
Esempio n. 22
0
    // Start is called before the first frame update


    // Update is called once per frame
    void Update()
    {
        if (flowchart.GetBooleanVariable("showMoral"))
        {
            moralBG.DOFade(1, 5f);

            if (moralBG.color.a >= 0.9)
            {
                moralText.gameObject.SetActive(true);
                moralText.text = "Ending " + flowchart.GetIntegerVariable("ending") + ":\n" + flowchart.GetStringVariable("moral");
                moralText.DOFade(1, 8f);
                restartButton.SetActive(true);
            }

            Image[] buttonImages = restartButton.GetComponentsInChildren <Image>();
            Text    buttonText   = restartButton.GetComponentInChildren <Text>();

            foreach (Image ima in buttonImages)
            {
                ima.DOFade(1, 5f);
            }

            buttonText.DOFade(1, 5);
        }
        else
        {
            moralBG.DOFade(0, 2);
            moralText.gameObject.SetActive(false);
            moralText.alpha = 0;
            restartButton.SetActive(false);
        }
    }
Esempio n. 23
0
 public void OpenPortal()
 {
     if (flowchart.GetBooleanVariable("hasSword") == true)
     {
         portal.SetActive(true);
     }
 }
Esempio n. 24
0
    // Update is called once per frame
    void Update()
    {
        if (isOnDialogArea)
        {
            if (Input.GetKeyDown(KeyCode.Space) && fc.GetBooleanVariable("Var") == false)
            {
                if (character.tag == "Character")
                {
                    fc.ExecuteBlock(character.GetComponent <CharDialog>().character.dialog);
                }
                else if (character.tag == "Item")
                {
                    fc.ExecuteBlock(character.GetComponent <ItemColected>().item.dialog);
                    character.GetComponent <Interact>().OnFocus();
                }
            }
        }

        if (Input.GetKeyDown(KeyCode.I))
        {
            fc.SetBooleanVariable("Var", true);
            PlayerMove.canvas.SetActive(true);
            PlayerMove.textarea.SetActive(false);
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (PlayerMove.canvas.activeSelf)
            {
                PlayerMove.canvas.SetActive(false);
                PlayerMove.textarea.SetActive(false);
                fc.SetBooleanVariable("Var", false);
            }
        }
    }
Esempio n. 25
0
    public void FirstEnterClicked()
    {
        InputField input   = GameObject.FindObjectOfType <InputField>();
        Text       textBox = input.GetComponentInChildren <Text>();

        // check if inputText == getEgg password , if yes, load dragon Scene
        // if not, show "wrong Password"
        if (passlist.pwarray[0].key == textBox.text)
        {
            dragon.GetEgg = true;

            //save dragon as getEgg == true
            dragon.Save();

            DontDestroyOnLoad(dragon);
            Flowchart flowchart = GameObject.FindObjectOfType <Flowchart>();
            flowchart.SetBooleanVariable("getEgg", true);
            print(flowchart.GetBooleanVariable("getEgg"));
        }
        else
        {
            input.text = "";
            GameObject.Find("Placeholder").GetComponent <Text>().text = "Wrong Password";
        }
    }
Esempio n. 26
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable("BoxTaskRecieved"))
     {
         Destroy(gameObject);
     }
 }
Esempio n. 27
0
 private void SubmitName(string arg0)
 {
     EventSystem.current.SetSelectedGameObject(null);
     code_input.text = "";
     if (!flowchart.GetBooleanVariable("L_R"))
     {
         if (arg0.Equals(CODE1_SOLUTION))
         {
             code1_solved = true;
             flowchart.ExecuteBlock("Feedback_Codepanel_Correct");
         }
         else
         {
             flowchart.ExecuteBlock("Feedback_Codepanel_Incorrect");
         }
     }
     else
     {
         if (arg0.Equals(CODE2_SOLUTION))
         {
             code2_solved = true;
             flowchart.ExecuteBlock("Feedback_Codepanel_Correct");
         }
         else
         {
             flowchart.ExecuteBlock("Feedback_Codepanel_Incorrect");
         }
     }
     checkAnswer();
 }
Esempio n. 28
0
 private void Update()
 {
     if (FC.GetBooleanVariable("Activate"))
     {
         score++;
         FC.SetBooleanVariable("Activate", false);
     }
 }
Esempio n. 29
0
 // Update is called once per frame
 void Update()
 {
     allowMovement = flowchart.GetBooleanVariable("allowMovement");
     if (allowMovement == true)
     {
         Move();
     }
 }
Esempio n. 30
0
 // Update is called once per frame
 void Update()
 {
     endgame = flowchart.GetBooleanVariable("endgame");
     if (endgame)
     {
         SceneManager.LoadScene("EndCredits");
     }
 }