Exemplo n.º 1
0
    void Update()
    {
        Vector2 playerposition       = player.position;
        Vector2 detectplayerposition = detectplayer.position;
        float   distance             = (playerposition - detectplayerposition).magnitude;

        if (Input.GetKeyDown(KeyCode.E) && distance < 1f && !frog)
        {
            enterDialog.SetActive(true);
            GameObject.Find("player").GetComponent <AudioSource>().enabled              = false;
            GameObject.Find("player").GetComponent <Rigidbody2D>().gravityScale         = 0;
            GameObject.Find("player").GetComponent <Rigidbody2D>().velocity             = new Vector2(0, 2f);
            GameObject.Find("BulletGenerator").GetComponent <bulletgenerator>().enabled = false;
            FindObjectOfType <PlayerController>().hightlighttrue();
            // GameObject.Find("BulletGenerator").SetActive(false);
            GameObject.Find("Canvas").SetActive(false);
            FindObjectOfType <PlayerController>().jumpmax();
            Endhighlight.SetActive(true);
            Invoke("enterDialogclose", 2f);
        }
        else if (Input.GetKeyDown(KeyCode.E) && distance < 1f)
        {
            CollectDialog.SetActive(true);
            Invoke("CollectDialogclose", 2f);
        }
    }
Exemplo n.º 2
0
        void Context_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "MultiStepActionParameter")
            {
                MyBrowser browser = Context.Browser as MyBrowser;

                if (AppSettings.Instance.ListToListAllowPrompt)
                {
                    CollectDialog dialog = new CollectDialog();
                    dialog.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
                    dialog.ShowDialog();
                }
            }
        }
Exemplo n.º 3
0
    void Update()
    {
        cherrynum = int.Parse(Cherry.text);
        Vector2 playerposition       = player.position;
        Vector2 detectplayerposition = detectplayer.position;
        float   distance             = (playerposition - detectplayerposition).magnitude;

        if (Input.GetKeyDown(KeyCode.E) && distance < 3f && cherrynum == 6)
        {
            // enterDialog.SetActive(true);
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
            // Invoke("enterDialogclose",3f);
        }
        else if (Input.GetKeyDown(KeyCode.E) && distance < 1f)
        {
            CollectDialog.SetActive(true);
            Invoke("CollectDialogclose", 2f);
        }
    }
Exemplo n.º 4
0
 void CollectDialogclose()
 {
     CollectDialog.SetActive(false);
 }