Example #1
0
 public void SecondClick()
 {
     Progress = 3;
     Button2.GetComponent <Button>().enabled = false;
     Button3.GetComponent <Button>().enabled = true;
     Button3.transform.Translate(0, 2.2f, 0);
 }
    void Update()
    {
        if (Progress == 3)
        {
            store = Wall3.GetComponent <SpriteRenderer>().sprite;
            if (store == ThirdWall)
            {
                Progress = 4;
                Wall3.GetComponent <Animator>().enabled       = false;
                Wall3.GetComponent <SpriteRenderer>().enabled = false;
                Wall4.GetComponent <Animator>().enabled       = true;
                Wall4.GetComponent <SpriteRenderer>().enabled = true;
                Button3.GetComponent <Button>().interactable  = true;
            }
        }
        Cloud1.transform.Translate(Iteration, 0, 0);
        Cloud2.transform.Translate(-Iteration, 0, 0);
        Cloud3.transform.Translate(Iteration, 0, 0);

        if (T < 0)
        {
            PlayerPrefs.SetInt("Result", Win);
            Store.GetComponent <PresentResults>().enabled = true;
            Store.GetComponent <GameBuildWall>().enabled  = false;
        }
        else
        {
            T = T - Time.deltaTime;
        }
    }
Example #3
0
    public void OnOkClick()
    {
        Panel.SetActive(false);

        Button1.GetComponent <Button>().enabled = true;
        Button2.GetComponent <Button>().enabled = true;
        Button3.GetComponent <Button>().enabled = true;
        Button4.GetComponent <Button>().enabled = true;
    }
Example #4
0
    void Start()
    {
        Button btn1 = Button1.GetComponent <Button>();
        Button btn2 = Button2.GetComponent <Button>();
        Button btn3 = Button3.GetComponent <Button>();

        //Calls the TaskOnClick/TaskWithParameters method when you click the Button
        btn1.onClick.AddListener(TaskOnClick1);
        btn2.onClick.AddListener(TaskOnClick2);
        btn3.onClick.AddListener(TaskOnClick3);
    }
Example #5
0
 void Start()
 {
     ScoreText.enabled = false;
     LivesText.enabled = false;
     RuleText.enabled  = false;
     Button2.GetComponent <Button>().enabled = false;
     Button3.GetComponent <Button>().enabled = false;
     Progress = 1;
     Win      = 0;
     T        = PlayerPrefs.GetFloat("PTime");
     Curtain.GetComponent <UpFlag>().enabled = true;
     tt = T;
 }
 void Start()
 {
     ScoreText.enabled = false;
     LivesText.enabled = false;
     RuleText.enabled  = false;
     Button2.GetComponent <Button>().interactable = false;
     Button3.GetComponent <Button>().interactable = false;
     Progress  = 1;
     Win       = 0;
     T         = PlayerPrefs.GetFloat("PTime");
     tt        = T;
     Iteration = 0.03f;
 }
Example #7
0
    // Update is called once per frame
    void Update()
    {
        if (Button1.GetComponent <ButtonScript>().active&& Button2.GetComponent <ButtonScript>().active)
        {
            Debug.Log("ButtonsPressed");
            bridge.SetActive(true);
            LevelAnimator.Play("DropBridge1", 4);
        }

        if (Button3.GetComponent <ButtonScript>().active)
        {
            bridge2.SetActive(true);
            LevelAnimator.Play("DropBridge2", 4);
        }
    }
Example #8
0
 public void Start()
 {
     Podpowiedz.SetActive(true);
     Button1.GetComponent <Button>().onClick.RemoveAllListeners();
     Button2.GetComponent <Button>().onClick.RemoveAllListeners();
     Button3.GetComponent <Button>().onClick.RemoveAllListeners();
     Button4.GetComponent <Button>().onClick.RemoveAllListeners();
     Button1.GetComponent <Button>().onClick.AddListener(() => QuizLogic(1));
     Button2.GetComponent <Button>().onClick.AddListener(() => QuizLogic(2));
     Button3.GetComponent <Button>().onClick.AddListener(() => QuizLogic(3));
     Button4.GetComponent <Button>().onClick.AddListener(() => QuizLogic(4));
     points = 0;
     index  = 0;
     drawQuestions();
     SetButtons(index);
     currentTime = startTime;
     isActive    = true;
 }
    void Awake()
    {
        thisLoggingID = loggingID++;

        Buttons = new KMSelectable[] { Button0, Button1, Button2, Button3, Button4, Button5, Button6, Button7, Button8, Button9 };

        transform.Find("Background").GetComponent <MeshRenderer>().material.color = new Color(1, 0.1f, 0.1f);

        MeshRenderer mr = transform.Find("Wiring").GetComponent <MeshRenderer>();

        mr.materials[0].color = new Color(0.1f, 0.1f, 0.1f);
        mr.materials[1].color = new Color(0.3f, 0.3f, 0.3f);
        mr.materials[2].color = new Color(0.1f, 0.4f, 0.8f);

        transform.Find("Main Display").Find("Edge").GetComponent <MeshRenderer>().material.color  = new Color(0, 0, 0);
        transform.Find("Stage Display").Find("Edge").GetComponent <MeshRenderer>().material.color = new Color(0, 0, 0);

        Button0.OnInteract += Handle0;
        Button1.OnInteract += Handle1;
        Button2.OnInteract += Handle2;
        Button3.OnInteract += Handle3;
        Button4.OnInteract += Handle4;
        Button5.OnInteract += Handle5;
        Button6.OnInteract += Handle6;
        Button7.OnInteract += Handle7;
        Button8.OnInteract += Handle8;
        Button9.OnInteract += Handle9;

        Color c = new Color(.71f, .70f, .68f); //new Color(0.91f, 0.88f, 0.86f);

        Button0.GetComponent <MeshRenderer>().material.color = c;
        Button1.GetComponent <MeshRenderer>().material.color = c;
        Button2.GetComponent <MeshRenderer>().material.color = c;
        Button3.GetComponent <MeshRenderer>().material.color = c;
        Button4.GetComponent <MeshRenderer>().material.color = c;
        Button5.GetComponent <MeshRenderer>().material.color = c;
        Button6.GetComponent <MeshRenderer>().material.color = c;
        Button7.GetComponent <MeshRenderer>().material.color = c;
        Button8.GetComponent <MeshRenderer>().material.color = c;
        Button9.GetComponent <MeshRenderer>().material.color = c;

        GetComponent <KMBombModule>().OnActivate += ActivateModule;
    }
Example #10
0
    public void CallAFriend()
    {
        Button1.GetComponent <Button>().enabled = false;
        Button2.GetComponent <Button>().enabled = false;
        Button3.GetComponent <Button>().enabled = false;
        Button4.GetComponent <Button>().enabled = false;

        Panel.SetActive(true);

        int Chance = Random.Range(0, 10);

        if (Chance == 5)
        {
            FriendAdviceText.text = "Мисля, че верният" + "\n" + "отговор е: " + QuestionManager.currentQuestion.answerB;
        }
        else
        {
            FriendAdviceText.text = "Мисля, че верният" + "\n" + "отговор е: " + QuestionManager.currentQuestion.answerA;
        }
    }
Example #11
0
 private void SetButtons(int i)
 {
     Button1.GetComponent <Button>().GetComponentInChildren <Text>().text = OdpA[numbers[i]];
     Button2.GetComponent <Button>().GetComponentInChildren <Text>().text = OdpB[numbers[i]];
     Button3.GetComponent <Button>().GetComponentInChildren <Text>().text = OdpC[numbers[i]];
     Button4.GetComponent <Button>().GetComponentInChildren <Text>().text = OdpD[numbers[i]];
     Pytanie.GetComponent <Text>().text = Pyt[numbers[i]];
     if (imageSrc[numbers[i]] == "NULL")
     {
         image.GetComponent <Image>().sprite = null;
         Pytanie.GetComponent <RectTransform>().localPosition = new Vector3(0, 550, 0);
         image.SetActive(false);
     }
     else
     {
         image.SetActive(true);
         image.GetComponent <RectTransform>().localPosition   = new Vector3(0, 200, 0);
         Pytanie.GetComponent <RectTransform>().localPosition = new Vector3(0, 600, 0);
         image.GetComponent <Image>().sprite = Resources.Load <Sprite>(imageSrc[numbers[i]]);
     }
 }
Example #12
0
 public void ThirdClick()
 {
     Win      = 1;
     Progress = 4;
     Button3.GetComponent <Button>().enabled = false;
 }
Example #13
0
    void Awake()
    {
        if (ignoredModules == null)
        {
            ignoredModules = GetComponent <KMBossModule>().GetIgnoredModules("Forget Me Not", new string[] {
                "14",
                "42",
                "501",
                "A>N<D",
                "Bamboozling Time Keeper",
                "Black Arrows",
                "Brainf---",
                "Busy Beaver",
                "Don't Touch Anything",
                "Floor Lights",
                "Forget Any Color",
                "Forget Enigma",
                "Forget Everything",
                "Forget Infinity",
                "Forget It Not",
                "Forget Maze Not",
                "Forget Me Later",
                "Forget Me Not",
                "Forget Perspective",
                "Forget The Colors",
                "Forget Them All",
                "Forget This",
                "Forget Us Not",
                "Iconic",
                "Keypad Directionality",
                "Kugelblitz",
                "Multitask",
                "OmegaDestroyer",
                "OmegaForest",
                "Organization",
                "Password Destroyer",
                "Purgatory",
                "RPS Judging",
                "Security Council",
                "Shoddy Chess",
                "Simon Forgets",
                "Simon's Stages",
                "Souvenir",
                "Tallordered Keys",
                "The Time Keeper",
                "Timing is Everything",
                "The Troll",
                "Turn The Key",
                "The Twin",
                "Übermodule",
                "Ultimate Custom Night",
                "The Very Annoying Button",
                "Whiteout"
            });
        }

        thisLoggingID = loggingID++;

        Buttons = new KMSelectable[] { Button0, Button1, Button2, Button3, Button4, Button5, Button6, Button7, Button8, Button9 };

        transform.Find("Background").GetComponent <MeshRenderer>().material.color = new Color(1, 0.1f, 0.1f);

        MeshRenderer mr = transform.Find("Wiring").GetComponent <MeshRenderer>();

        mr.materials[0].color = new Color(0.1f, 0.1f, 0.1f);
        mr.materials[1].color = new Color(0.3f, 0.3f, 0.3f);
        mr.materials[2].color = new Color(0.1f, 0.4f, 0.8f);

        transform.Find("Main Display").Find("Edge").GetComponent <MeshRenderer>().material.color  = new Color(0, 0, 0);
        transform.Find("Stage Display").Find("Edge").GetComponent <MeshRenderer>().material.color = new Color(0, 0, 0);

        Button0.OnInteract += Handle0;
        Button1.OnInteract += Handle1;
        Button2.OnInteract += Handle2;
        Button3.OnInteract += Handle3;
        Button4.OnInteract += Handle4;
        Button5.OnInteract += Handle5;
        Button6.OnInteract += Handle6;
        Button7.OnInteract += Handle7;
        Button8.OnInteract += Handle8;
        Button9.OnInteract += Handle9;

        Color c = new Color(.71f, .70f, .68f); //new Color(0.91f, 0.88f, 0.86f);

        Button0.GetComponent <MeshRenderer>().material.color = c;
        Button1.GetComponent <MeshRenderer>().material.color = c;
        Button2.GetComponent <MeshRenderer>().material.color = c;
        Button3.GetComponent <MeshRenderer>().material.color = c;
        Button4.GetComponent <MeshRenderer>().material.color = c;
        Button5.GetComponent <MeshRenderer>().material.color = c;
        Button6.GetComponent <MeshRenderer>().material.color = c;
        Button7.GetComponent <MeshRenderer>().material.color = c;
        Button8.GetComponent <MeshRenderer>().material.color = c;
        Button9.GetComponent <MeshRenderer>().material.color = c;

        GetComponent <KMBombModule>().OnActivate += ActivateModule;
    }
Example #14
0
 public void SetButton3()
 {
     Button1.GetComponent <GeneralButtonBehaviour>().Deselect();
     Button2.GetComponent <GeneralButtonBehaviour>().Deselect();
     Button3.GetComponent <GeneralButtonBehaviour>().Select();
 }