コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        chr_Kawi.loveMeterValue  = flowchart.GetFloatVariable("KwaiLoveMeter");
        chr_Unkel.loveMeterValue = flowchart.GetFloatVariable("UnkelLoveMeter");
        chr_Noir.loveMeterValue  = flowchart.GetFloatVariable("NoirLoveMeter");


        chr_Kawi.UpdateLoveValue();
        chr_Unkel.UpdateLoveValue();
        chr_Noir.UpdateLoveValue();

        UpdateFungusVariabels();
        CheatCodes();
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     //News Info in Newspaper
     if (flowchart.GetFloatVariable("newsNum") == 1.0f)
     {
         txtNews.text = "This person tends to ramble and go off topic.";
     }
     else if (flowchart.GetFloatVariable("newsNum") == 2.0f)
     {
         txtNews.text = "This person may get mistaken for someone else.";
     }
     else if (flowchart.GetFloatVariable("newsNum") == 3.0f)
     {
         txtNews.text = "This person usually wears dark clothing.";
     }
 }
コード例 #3
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");
 }
コード例 #4
0
 // Update is called once per frame
 void Update()
 {
     unhappiness = flowchart.GetFloatVariable("Unhappiness");
     if (unhappiness > 1)
     {
         unhappiness = 1;
     }
     GetComponent <Grayscale>().effectAmount = unhappiness;
     audio.pitch = audiopitch - unhappiness / 8;
 }
コード例 #5
0
 // Update is called once per frame
 void Update()
 {
     if (flowy.GetBooleanVariable("p1") == true)
     {
         Debug.Log("hello");
         me.text = "Points:" + flowy.GetFloatVariable("points1");
         //me.enabled = true;
     }
     else
     {
     }
     if (flowy.GetBooleanVariable("p2") == true)
     {
         me.text = "" + ScreenShot.pin2;
     }
     else
     {
         //me.text = "";
     }
     if (flowy.GetBooleanVariable("p3") == true)
     {
         me.text = "" + ScreenShot.pin3;
     }
     else
     {
         //me.text = "";
     }
     if (flowy.GetBooleanVariable("p4") == true)
     {
         me.text = "" + ScreenShot.pin4;
     }
     else
     {
         //me.text = "";
     }
     if (flowy.GetBooleanVariable("p5") == true)
     {
         me.text = "" + ScreenShot.pin5;
     }
     else
     {
         //me.text = "";
     }
     if (flowy.GetBooleanVariable("p6") == true)
     {
         me.text = "" + ScreenShot.pin6;
     }
     else
     {
         //me.text = "";
     }
 }
コード例 #6
0
ファイル: Player.cs プロジェクト: Shramper/BallotBluff
    // Update is called once per frame
    void Update()
    {
        if (flowchart.GetBooleanVariable("diagActive") || isInteract == true)
        {
            //Debug.Log (flowchart.GetBooleanVariable ("diagActive"));
            playerActive     = false;
            Cursor.lockState = CursorLockMode.None;
            Cursor.visible   = true;
        }
        else if (!flowchart.GetBooleanVariable("diagActive") || isInteract == false)
        {
            //Debug.Log (flowchart.GetBooleanVariable ("diagActive"));
            playerActive     = true;
            Cursor.lockState = CursorLockMode.Locked;
        }


        //Mouse Position on Fixed Camera
        ray = fixedCamera.ScreenPointToRay(Input.mousePosition);
        if (Physics.Raycast(ray, out hit))
        {
            //print (hit.collider.name);
            if (hit.collider.name == "obj_News1")
            {
                numNewsObj = 1.0f;
            }
            else if (hit.collider.name == "obj_News2")
            {
                numNewsObj = 2.0f;
            }
            else if (hit.collider.name == "obj_News3")
            {
                numNewsObj = 3.0f;
            }
            else if (hit.collider.name == "Floor")                 //Not touching any of the newspapers

            {
                numNewsObj = 0.0f;
            }
        }

        //If Main Camera is enabled
        if (Camera.main.enabled == true)
        {
            if (playerActive)
            {
                //Rotation
                horizontalRot = Input.GetAxis("Mouse X") * mouseSens;
                transform.Rotate(0, horizontalRot, 0);

                //Mouse Look
                verticalRot -= Input.GetAxis("Mouse Y") * mouseSens;
                verticalRot  = Mathf.Clamp(verticalRot, -rotRange, rotRange);
                Camera.main.transform.localRotation = Quaternion.Euler(verticalRot, 0, 0);

                //Simple Movement
                forwardspeed = Input.GetAxis("Vertical") * movementSpeed;
                sideSpeed    = Input.GetAxis("Horizontal") * movementSpeed;

                speed = new Vector3(sideSpeed, 0, forwardspeed);

                speed = transform.rotation * speed;

                CharacterController cc = GetComponent <CharacterController> ();
                cc.SimpleMove(speed);
            }

            //Interact Controls
            if (Input.GetMouseButtonDown(0))               //LEFT CLICK to interact

            //If Interacting with Still Cam Object - Fixed Camera on an object
            {
                if (fixedCamScript.interacting == true && playerActive)
                {
                    isInteract = true;                             //If player is currently interacting with something.

                    fixedCamScript.FixCam();                       //THE CAMERA IS NOW FIXED ON THE NEWSPAPERS

                    if (flowchart.GetFloatVariable("newsNum") > 0) //If a Newspaper has already been chosen

                    {
                        flowchart.ExecuteBlock("FixedCam_Start");                          //****Play a Block that supports chosen newspaper, or skip to a certain block
                    }
                    else
                    {
                        flowchart.ExecuteBlock("FixedCam_Start");                          //Otherwise, choose Newspaper
                    }
                }

                if (isInteract && fixedCamScript.interacting && !flowchart.GetBooleanVariable("diagActive") && !fixedCamScript.newsUIScript.isActive)                    //Clicking during fixed Camera

                {
                    if (numNewsObj == 1.0f)
                    {
                        Debug.Log("NEWSPAPER 1");
                        flowchart.ExecuteBlock("FixedCam_News1");                          //I have to have everything work out here.
                    }
                    else if (numNewsObj == 2.0f)
                    {
                        Debug.Log("NEWSPAPER 2");
                        flowchart.ExecuteBlock("FixedCam_News2");
                    }
                    else if (numNewsObj == 3.0f)
                    {
                        Debug.Log("NEWSPAPER 3");
                        flowchart.ExecuteBlock("FixedCam_News3");
                    }
                }

                if (npcScript.interacting == true && playerActive && !npcScript.done)
                {
                    isInteract       = true;
                    Cursor.lockState = CursorLockMode.None;
                    Cursor.visible   = true;

                    npcScript.NPCInteract();
                    flowchart.ExecuteBlock("NPC_Start");
                }

                if (tvScript.interacting == true && playerActive && !tvScript.done)
                {
                    isInteract       = true;
                    Cursor.lockState = CursorLockMode.None;
                    Cursor.visible   = true;

                    tvScript.TVInteract();
                }


                //If Interacting with Dialogue Object - Dialogue over screen


                //If Interacting with CamDialogue Object - Fixed Camera on object, Dialogue over screen
            }



            if (Input.GetMouseButtonDown(1))                //RIGHT CLICK to stop interacting

            {
                if (fixedCamScript.newsUIScript.isActive)                   //Closing the UI

                {
                    Debug.Log("CLOSE NEWSPAPER");
                    fixedCamScript.newsUIScript.CloseNews();
                    isInteract = false;
                    fixedCamScript.UnfixCam();
                }
                else
                {
                    if (fixedCamScript.interacting == true && !playerActive && !flowchart.GetBooleanVariable("NewsDone"))
                    {
                        Debug.Log("Finishing fixed cam");
                        fixedCamScript.UnfixCam();
                    }

                    if (npcScript.interacting == true && !playerActive)
                    {
                        Debug.Log("Finishing NPC");
                        npcScript.NPCQuit();
                    }
                }

                //Cancel out of Dialogue Box

                //Cancel out of CamDialogue
            }


            if (Input.GetKeyDown(KeyCode.Space))                //Bringing up Journal

            {
                if (!flowchart.GetBooleanVariable("diagActive"))                    //Does not open Journal during Dialogue

                {
                    Debug.Log("Pressed Space");
                    if (journalScript.isActive == false)
                    {
                        journalScript.OpenJournal();
                    }
                    else if (journalScript.isActive == true)
                    {
                        journalScript.CloseJournal();
                    }
                }
            }
        }
    }
コード例 #7
0
 public override void OnEnter()
 {
     result.Value = flowchart.GetFloatVariable(parameter.Value);
     Finish();
 }
コード例 #8
0
    // Update is called once per frame
    void Update()
    {
        //News Info in Journal
        if (flowchart.GetFloatVariable("newsNum") == 0.0f)
        {
            txtNews.text = "I have yet to read the news.";
        }
        else if (flowchart.GetFloatVariable("newsNum") == 1.0f)
        {
            txtNews.text = "This person tends to ramble and go off topic.";
        }
        else if (flowchart.GetFloatVariable("newsNum") == 2.0f)
        {
            txtNews.text = "This person may get mistaken for someone else.";
        }
        else if (flowchart.GetFloatVariable("newsNum") == 3.0f)
        {
            txtNews.text = "This person usually wears dark clothing.";
        }

        //NPC Info in Journal
        if (flowchart.GetFloatVariable("npcNum") == 0)
        {
            txtNPC.text = "I have yet to talk to the NPC.";
        }
        else if (flowchart.GetFloatVariable("npcNum") == 1)
        {
            txtNPC.text = "This person wears fancy clothes, and glasses.";
        }
        else if (flowchart.GetFloatVariable("npcNum") == 2)
        {
            txtNPC.text = "This person is male.";
        }
        else if (flowchart.GetFloatVariable("npcNum") == 3)
        {
            txtNPC.text = "This person dabbles in the game dev industry, but also teaches.";
        }
        else if (flowchart.GetFloatVariable("npcNum") == 4)
        {
            txtNPC.text = "This person isn't originally from Toronto.";
        }

        //TV Info in Journal
        if (tvScript.tvNum == 0)
        {
            txtTV.text = "I have yet to watch the news.";
        }
        else if (tvScript.tvNum == 1)
        {
            txtTV.text = "This person has gone to Level Up Showcase, and spoken with big people there.";
        }
        else if (tvScript.tvNum == 2)
        {
            txtTV.text = "This person is an irregular visitor, except for one particular day.";
        }
        else if (tvScript.tvNum == 3)
        {
            txtTV.text = "This person was seen recently leaving the building with a student and fellow teacher from last semester";
        }
        else if (tvScript.tvNum >= 4)
        {
            txtTV.text = "I unfortunately missed the latest news stories.";
        }
    }