コード例 #1
0
ファイル: check.cs プロジェクト: ryan851109/ARescape
 // 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);
         }
     }
 }
コード例 #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);
        }
    }
コード例 #3
0
    // Update is called once per frame
    void Update()
    {
        bl_conversationEnd = FungusFlow.GetBooleanVariable("bl_textCycleOver");
        bl_AcceptedTask    = FungusFlow.GetBooleanVariable("bl_accepted");

        CheckConversationLoop();
    }
コード例 #4
0
 void getFlowchartNums()
 {
     skillsNum      = flowchart.GetIntegerVariable("SkillsNum");
     firstProblem   = flowchart.GetBooleanVariable("FirstProblem");
     inExam         = flowchart.GetBooleanVariable("InExam");
     currentProblem = flowchart.GetIntegerVariable("CurrentProblem");
 }
コード例 #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);
                }
            }
        }
    }
コード例 #6
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable("allAnswerRight") == true)
     {
         Give_hero_3();
     }
 }
コード例 #7
0
ファイル: compareAns.cs プロジェクト: lynn84961/PnCG
 void getFlowchartNums()
 {
     firstProblem   = flowchart.GetBooleanVariable("FirstProblem");
     currentProblem = flowchart.GetIntegerVariable("CurrentProblem");
     inExam         = flowchart.GetBooleanVariable("InExam");
     examLast       = flowchart.GetBooleanVariable("ExamLast");
     examScore      = flowchart.GetFloatVariable("ExamScore");
 }
コード例 #8
0
ファイル: EnkiduInside.cs プロジェクト: unkelben/gilgamesh
    // Update is called once per frame
    void Update()
    {
        allowMovement = flowchart.GetBooleanVariable("allowMovement");
        drinkReady    = flowchart.GetBooleanVariable("drinkReady");
        isRunning     = flowchart.GetBooleanVariable("isRunning");

        Move();
        SetDrinkPose();
    }
コード例 #9
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart)
     {
         if (!flowchart.GetBooleanVariable("negotiating") && inCombat)
         {
             FillStamina();
         }
     }
 }
コード例 #10
0
ファイル: QuestItem.cs プロジェクト: axl-parangan/thesisRPG
 // 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);
     }
 }
コード例 #11
0
ファイル: DrinkArea.cs プロジェクト: unkelben/gilgamesh
    // Update is called once per frame
    void Update()
    {
        startDrinkGame   = flowchart.GetBooleanVariable("startDrinkGame");
        startClothesGame = flowchart.GetBooleanVariable("startClothesGame");

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

        if (startClothesGame == true)
        {
            clothesGame();
        }
    }
コード例 #12
0
ファイル: second_over.cs プロジェクト: ryan851109/ARescape
    // 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);
        }
    }
コード例 #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;
            }
        }
    }
コード例 #14
0
    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));
    }
コード例 #15
0
 void Update()
 {
     if (fc.GetBooleanVariable("isOver") == true)
     {
         mouseOn = false;
     }
 }
コード例 #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
     }
 }
コード例 #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);
        }
    }
コード例 #18
0
ファイル: Narrator.cs プロジェクト: nemui/ggj2019
    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);
    }
コード例 #19
0
 // Update is called once per frame
 void Update()
 {
     if (flowchartEnd.GetBooleanVariable("endGame"))
     {
         Initiate.Fade("theEnd", loadToColor, 1.0f);
     }
 }
コード例 #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;
            }
        }
    }
コード例 #21
0
 // Update is called once per frame
 void Update()
 {
     if (endingFlowchart.GetBooleanVariable("end"))
     {
         SceneManager.LoadScene("Menu");
     }
 }
コード例 #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);
        }
    }
コード例 #23
0
 public void OpenPortal()
 {
     if (flowchart.GetBooleanVariable("hasSword") == true)
     {
         portal.SetActive(true);
     }
 }
コード例 #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);
            }
        }
    }
コード例 #25
0
ファイル: ButtonClicked.cs プロジェクト: csinrn/DragonEgg
    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";
        }
    }
コード例 #26
0
 // Update is called once per frame
 void Update()
 {
     if (flowchart.GetBooleanVariable("BoxTaskRecieved"))
     {
         Destroy(gameObject);
     }
 }
コード例 #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();
 }
コード例 #28
0
 private void Update()
 {
     if (FC.GetBooleanVariable("Activate"))
     {
         score++;
         FC.SetBooleanVariable("Activate", false);
     }
 }
コード例 #29
0
ファイル: Enkidu.cs プロジェクト: unkelben/gilgamesh
 // Update is called once per frame
 void Update()
 {
     allowMovement = flowchart.GetBooleanVariable("allowMovement");
     if (allowMovement == true)
     {
         Move();
     }
 }
コード例 #30
0
 // Update is called once per frame
 void Update()
 {
     endgame = flowchart.GetBooleanVariable("endgame");
     if (endgame)
     {
         SceneManager.LoadScene("EndCredits");
     }
 }