Exemple #1
0
        private void DisplaySecondLevel()
        {
            B2.Clear();
            B8.Clear();
            B8.ReadOnly = false;
            B12.Clear();
            B13.Clear();
            B15.Clear();
            B16.Clear();
            B16.ReadOnly = false;

            B3.Text     = "3";
            B3.ReadOnly = true;
            B4.Clear();
            B4.ReadOnly = false;
            B5.Clear();
            B5.ReadOnly = false;
            B6.Text     = "2";
            B6.ReadOnly = true;
            B7.Clear();
            B7.ReadOnly = false;
            B9.Text     = "4";
            B9.ReadOnly = true;
            B10.Clear();
            B10.ReadOnly = false;
            B14.Text     = "1";
            B14.ReadOnly = true;
        }
Exemple #2
0
        private void DisplayThirdLevel()
        {
            B2.Clear();

            B3.Clear();
            B3.ReadOnly = false;

            B5.Clear();
            B7.Clear();
            B8.Clear();
            B10.Clear();

            B11.Clear();
            B11.ReadOnly = false;


            B13.Clear();


            B14.Clear();
            B14.ReadOnly = false;

            B15.Clear();
            B16.Clear();

            B4.Text     = "2";
            B4.ReadOnly = true;

            B12.Text     = "1";
            B12.ReadOnly = true;
        }
Exemple #3
0
 void Reset()
 {
     isPlaying = false;
     isCopied  = false;
     B1.GetComponent <TrailRenderer>().time = 0.0f;
     B1.SetActive(false);
     B1.GetComponent <Ball>().Dead          = false;
     B2.GetComponent <TrailRenderer>().time = 0.0f;
     B2.SetActive(false);
     B2.GetComponent <Ball>().Dead = false;
     B3.SetActive(false);
     B3.GetComponent <TrailRenderer>().time = 0.0f;
     B3.GetComponent <Ball>().Dead          = false;
     B4.SetActive(false);
     B4.GetComponent <TrailRenderer>().time = 0.0f;
     B4.GetComponent <Ball>().Dead          = false;
     B5.SetActive(false);
     B5.GetComponent <TrailRenderer>().time = 0.0f;
     B5.GetComponent <Ball>().Dead          = false;
     B6.SetActive(false);
     B6.GetComponent <TrailRenderer>().time = 0.0f;
     B6.GetComponent <Ball>().Dead          = false;
     B7.SetActive(false);
     B7.GetComponent <TrailRenderer>().time = 0.0f;
     B7.GetComponent <Ball>().Dead          = false;
     ChangeColor(0);
 }
Exemple #4
0
    //public GameObject Starter;
    //bool A = true;
    //bool B = true;

    // Use this for initialization
    void Awake()
    {
        isPlaying = false;
        isCopied  = false;
        //StartCoroutine ("Updat");
        Rb1  = B1.GetComponent <Rigidbody2D> ();
        Rb2  = B2.GetComponent <Rigidbody2D> ();
        Rb3  = B3.GetComponent <Rigidbody2D> ();
        Rb4  = B4.GetComponent <Rigidbody2D> ();
        Rb5  = B5.GetComponent <Rigidbody2D> ();
        Rb6  = B6.GetComponent <Rigidbody2D> ();
        Rb7  = B7.GetComponent <Rigidbody2D> ();
        Tr1  = B1.transform;
        Tr2  = B2.transform;
        Tr3  = B3.transform;
        Tr4  = B4.transform;
        Tr5  = B5.transform;
        Tr6  = B6.transform;
        Tr7  = B7.transform;
        Pos1 = Out1.transform.position;
        Pos2 = Out2.transform.position;
        Pos3 = Out3.transform.position;
        Pos4 = Out4.transform.position;
        Pos5 = Out5.transform.position;
        Pos6 = Out6.transform.position;
        Pos7 = Out7.transform.position;
        S    = GetComponent <SpriteRenderer> ();
    }
    public void setRespFalse()
    {
        A1.SetActive(false);
        A2.SetActive(false);
        A3.SetActive(false);
        A4.SetActive(false);
        A5.SetActive(false);
        A6.SetActive(false);
        A7.SetActive(false);

        B1.SetActive(false);
        B2.SetActive(false);
        B3.SetActive(false);
        B4.SetActive(false);
        B5.SetActive(false);
        B6.SetActive(false);
        B7.SetActive(false);

        C1.SetActive(false);
        C2.SetActive(false);
        C3.SetActive(false);
        C4.SetActive(false);
        C5.SetActive(false);
        C6.SetActive(false);
        C7.SetActive(false);
    }
Exemple #6
0
        public void TestOrderCycle()
        {
            var a = new A7();
            var b = new B7();
            var c = new C7();
            var s = new IBuildStep[] { b, a, c };

            Assert.That(() => Builder.SortSteps(s), Throws.ArgumentException);
        }
Exemple #7
0
        public void TestOrderCycle()
        {
            var a = new A7();
            var b = new B7();
            var c = new C7();
            var s = new IBuildStep[] { b, a, c };

            Assert.DoesNotThrow(() => Builder.SortSteps(s));
        }
Exemple #8
0
 // Start is called before the first frame update
 void Start()
 {
     stopWatch = new Stopwatch();
     stopWatch.Start();
     scoreText.text = "Score: " + score.ToString();
     score          = 0;
     b2             = FindObjectOfType <Bullet2script>();
     b1             = FindObjectOfType <sc>();
     b3             = FindObjectOfType <B3>();
     b4             = FindObjectOfType <B4>();
     b5             = FindObjectOfType <B5>();
     b6             = FindObjectOfType <B6>();
     b7             = FindObjectOfType <B7>();
     b8             = FindObjectOfType <B8>();
     b9             = FindObjectOfType <B9>();
     b10            = FindObjectOfType <B10>();
     b11            = FindObjectOfType <B11>();
     b12            = FindObjectOfType <B12>();
     b13            = FindObjectOfType <B13>();
     b14            = FindObjectOfType <B14>();
     b15            = FindObjectOfType <B15>();
     b16            = FindObjectOfType <B16>();
     b17            = FindObjectOfType <B17>();
     b18            = FindObjectOfType <B18>();
     b19            = FindObjectOfType <B19>();
     b20            = FindObjectOfType <B20>();
     b21            = FindObjectOfType <B21>();
     b22            = FindObjectOfType <B22>();
     b23            = FindObjectOfType <B23>();
     b24            = FindObjectOfType <B24>();
     b25            = FindObjectOfType <B25>();
     b26            = FindObjectOfType <B26>();
     b27            = FindObjectOfType <B27>();
     b28            = FindObjectOfType <B28>();
     b29            = FindObjectOfType <B29>();
     b30            = FindObjectOfType <B30>();
     b31            = FindObjectOfType <B31>();
     b32            = FindObjectOfType <B32>();
     b33            = FindObjectOfType <B33>();
     b34            = FindObjectOfType <B34>();
     b35            = FindObjectOfType <B35>();
     b36            = FindObjectOfType <B36>();
     b37            = FindObjectOfType <B37>();
     b38            = FindObjectOfType <B38>();
     b39            = FindObjectOfType <B39>();
     b40            = FindObjectOfType <B40>();
     b41            = FindObjectOfType <B41>();
 }
Exemple #9
0
    // Use this for initialization
    void Start()
    {
        PlayerIcon.GetComponent <SpriteRenderer>().enabled = true;
        A1.GetComponent <SpriteRenderer>().enabled         = false;
        A2.GetComponent <SpriteRenderer>().enabled         = false;
        A3.GetComponent <SpriteRenderer>().enabled         = false;
        A4.GetComponent <SpriteRenderer>().enabled         = false;
        A5.GetComponent <SpriteRenderer>().enabled         = false;
        A6.GetComponent <SpriteRenderer>().enabled         = false;
        A7.GetComponent <SpriteRenderer>().enabled         = false;
        A8.GetComponent <SpriteRenderer>().enabled         = false;
        A9.GetComponent <SpriteRenderer>().enabled         = false;
        A10.GetComponent <SpriteRenderer>().enabled        = false;
        A11.GetComponent <SpriteRenderer>().enabled        = false;
        B1.GetComponent <SpriteRenderer>().enabled         = false;
        B2.GetComponent <SpriteRenderer>().enabled         = false;
        B3.GetComponent <SpriteRenderer>().enabled         = false;
        B4.GetComponent <SpriteRenderer>().enabled         = false;
        B5.GetComponent <SpriteRenderer>().enabled         = false;
        B6.GetComponent <SpriteRenderer>().enabled         = false;
        B7.GetComponent <SpriteRenderer>().enabled         = false;
        B8.GetComponent <SpriteRenderer>().enabled         = false;
        B9.GetComponent <SpriteRenderer>().enabled         = false;
        B10.GetComponent <SpriteRenderer>().enabled        = false;
        B11.GetComponent <SpriteRenderer>().enabled        = false;
        C1.GetComponent <SpriteRenderer>().enabled         = false;
        C2.GetComponent <SpriteRenderer>().enabled         = false;
        C3.GetComponent <SpriteRenderer>().enabled         = false;
        C4.GetComponent <SpriteRenderer>().enabled         = false;
        C5.GetComponent <SpriteRenderer>().enabled         = false;
        C6.GetComponent <SpriteRenderer>().enabled         = false;
        C7.GetComponent <SpriteRenderer>().enabled         = false;
        C8.GetComponent <SpriteRenderer>().enabled         = false;
        C9.GetComponent <SpriteRenderer>().enabled         = false;
        C10.GetComponent <SpriteRenderer>().enabled        = false;
        C11.GetComponent <SpriteRenderer>().enabled        = false;
        D1.GetComponent <SpriteRenderer>().enabled         = false;
        D2.GetComponent <SpriteRenderer>().enabled         = false;
        D3.GetComponent <SpriteRenderer>().enabled         = false;
        D4.GetComponent <SpriteRenderer>().enabled         = false;
        D5.GetComponent <SpriteRenderer>().enabled         = false;
        D6.GetComponent <SpriteRenderer>().enabled         = false;
        D7.GetComponent <SpriteRenderer>().enabled         = false;
        D8.GetComponent <SpriteRenderer>().enabled         = false;
        D9.GetComponent <SpriteRenderer>().enabled         = false;
        D10.GetComponent <SpriteRenderer>().enabled        = false;
        D11.GetComponent <SpriteRenderer>().enabled        = false;
        E1.GetComponent <SpriteRenderer>().enabled         = false;
        E2.GetComponent <SpriteRenderer>().enabled         = false;
        E3.GetComponent <SpriteRenderer>().enabled         = false;
        E4.GetComponent <SpriteRenderer>().enabled         = false;
        E5.GetComponent <SpriteRenderer>().enabled         = false;
        E6.GetComponent <SpriteRenderer>().enabled         = false;
        E7.GetComponent <SpriteRenderer>().enabled         = false;
        E8.GetComponent <SpriteRenderer>().enabled         = false;
        E9.GetComponent <SpriteRenderer>().enabled         = false;
        E10.GetComponent <SpriteRenderer>().enabled        = false;
        E11.GetComponent <SpriteRenderer>().enabled        = false;
        F1.GetComponent <SpriteRenderer>().enabled         = false;
        F2.GetComponent <SpriteRenderer>().enabled         = false;
        F3.GetComponent <SpriteRenderer>().enabled         = false;
        F4.GetComponent <SpriteRenderer>().enabled         = false;
        F5.GetComponent <SpriteRenderer>().enabled         = false;
        F6.GetComponent <SpriteRenderer>().enabled         = false;
        F7.GetComponent <SpriteRenderer>().enabled         = false;
        F8.GetComponent <SpriteRenderer>().enabled         = false;
        F9.GetComponent <SpriteRenderer>().enabled         = false;
        F10.GetComponent <SpriteRenderer>().enabled        = false;
        F11.GetComponent <SpriteRenderer>().enabled        = false;
        G1.GetComponent <SpriteRenderer>().enabled         = false;
        G2.GetComponent <SpriteRenderer>().enabled         = false;
        G3.GetComponent <SpriteRenderer>().enabled         = false;
        G4.GetComponent <SpriteRenderer>().enabled         = false;
        G5.GetComponent <SpriteRenderer>().enabled         = false;
        G6.GetComponent <SpriteRenderer>().enabled         = false;
        G7.GetComponent <SpriteRenderer>().enabled         = false;
        G8.GetComponent <SpriteRenderer>().enabled         = false;
        G9.GetComponent <SpriteRenderer>().enabled         = false;
        G10.GetComponent <SpriteRenderer>().enabled        = false;
        G11.GetComponent <SpriteRenderer>().enabled        = false;
        H1.GetComponent <SpriteRenderer>().enabled         = false;
        H2.GetComponent <SpriteRenderer>().enabled         = false;
        H3.GetComponent <SpriteRenderer>().enabled         = false;
        H4.GetComponent <SpriteRenderer>().enabled         = false;
        H5.GetComponent <SpriteRenderer>().enabled         = false;
        H6.GetComponent <SpriteRenderer>().enabled         = false;
        H7.GetComponent <SpriteRenderer>().enabled         = false;
        H8.GetComponent <SpriteRenderer>().enabled         = false;
        H9.GetComponent <SpriteRenderer>().enabled         = false;
        H10.GetComponent <SpriteRenderer>().enabled        = false;
        H11.GetComponent <SpriteRenderer>().enabled        = false;
        I1.GetComponent <SpriteRenderer>().enabled         = false;
        I2.GetComponent <SpriteRenderer>().enabled         = false;
        I3.GetComponent <SpriteRenderer>().enabled         = false;
        I4.GetComponent <SpriteRenderer>().enabled         = false;
        I5.GetComponent <SpriteRenderer>().enabled         = false;
        I6.GetComponent <SpriteRenderer>().enabled         = false;
        I7.GetComponent <SpriteRenderer>().enabled         = false;
        I8.GetComponent <SpriteRenderer>().enabled         = false;
        I9.GetComponent <SpriteRenderer>().enabled         = false;
        I10.GetComponent <SpriteRenderer>().enabled        = false;
        I11.GetComponent <SpriteRenderer>().enabled        = false;
        J1.GetComponent <SpriteRenderer>().enabled         = false;
        J2.GetComponent <SpriteRenderer>().enabled         = false;
        J3.GetComponent <SpriteRenderer>().enabled         = false;
        J4.GetComponent <SpriteRenderer>().enabled         = false;
        J5.GetComponent <SpriteRenderer>().enabled         = false;
        J6.GetComponent <SpriteRenderer>().enabled         = false;
        J7.GetComponent <SpriteRenderer>().enabled         = false;
        J8.GetComponent <SpriteRenderer>().enabled         = false;
        J9.GetComponent <SpriteRenderer>().enabled         = false;
        J10.GetComponent <SpriteRenderer>().enabled        = false;
        J11.GetComponent <SpriteRenderer>().enabled        = false;
        K1.GetComponent <SpriteRenderer>().enabled         = false;
        K2.GetComponent <SpriteRenderer>().enabled         = false;
        K3.GetComponent <SpriteRenderer>().enabled         = false;
        K4.GetComponent <SpriteRenderer>().enabled         = false;
        K5.GetComponent <SpriteRenderer>().enabled         = false;
        K6.GetComponent <SpriteRenderer>().enabled         = false;
        K7.GetComponent <SpriteRenderer>().enabled         = false;
        K8.GetComponent <SpriteRenderer>().enabled         = false;
        K9.GetComponent <SpriteRenderer>().enabled         = false;
        K10.GetComponent <SpriteRenderer>().enabled        = false;
        K11.GetComponent <SpriteRenderer>().enabled        = false;
        float ratio = Screen.width / Screen.height;

        if (ratio < 2)
        {
            int screenx = 543;
            int screeny = 653;
        }
        else
        {
            int screenx = 743;
            int screeny = 853;
        }
    }
Exemple #10
0
    IEnumerator Rexar(int Layer, Collider2D other)
    {
        B1.SetActive(true);
        Tr1.position = Pos1;
        B1.layer     = Layer;
        B1.GetComponent <Ball> ().Direction = Direction1;

        B2.SetActive(true);
        Tr2.position = Pos2;
        B2.layer     = Layer;
        B2.GetComponent <Ball> ().Direction = Direction2;
        //Rb2 = other.GetComponent<Rigidbody2D> ();
        B3.SetActive(true);
        Tr3.position = Pos3;
        B3.layer     = Layer;
        B3.GetComponent <Ball> ().Direction = Direction2;

        B4.SetActive(true);
        Tr4.position = Pos4;
        B4.layer     = Layer;
        B4.GetComponent <Ball> ().Direction = Direction2;

        B5.SetActive(true);
        Tr5.position = Pos5;
        B5.layer     = Layer;
        B5.GetComponent <Ball> ().Direction = Direction2;

        B6.SetActive(true);
        Tr6.position = Pos6;
        B6.layer     = Layer;
        B6.GetComponent <Ball> ().Direction = Direction2;

        B7.SetActive(true);
        Tr7.position = Pos7;
        B7.layer     = Layer;
        B7.GetComponent <Ball> ().Direction = Direction2;
        yield return(new WaitForSeconds(0.1f));

        Rb1.Sleep();
        B1.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb2.Sleep();
        B2.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb3.Sleep();
        B3.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb4.Sleep();
        B4.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb5.Sleep();
        B5.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb6.Sleep();
        B6.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Rb7.Sleep();
        B7.GetComponent <TrailRenderer> ().time = Mathf.Infinity;
        Tr1.position = Pos1;
        Tr2.position = Pos2;
        Tr3.position = Pos3;
        Tr4.position = Pos4;
        Tr5.position = Pos5;
        Tr6.position = Pos6;
        Tr7.position = Pos7;



        if (Direction1.Equals(1))
        {
            Rb1.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction1.Equals(2))
        {
            Rb1.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction1.Equals(3))
        {
            Rb1.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction1.Equals(4))
        {
            Rb1.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction1.Equals(8))
        {
            Rb1.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction1.Equals(7))
        {
            Rb1.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction1.Equals(6))
        {
            Rb1.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction1.Equals(5))
        {
            Rb1.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction1.Equals(9))
        {
            Rb1.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction1.Equals(10))
        {
            Rb1.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction1.Equals(11))
        {
            Rb1.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction1.Equals(12))
        {
            Rb1.AddForce(V * new Vector2(178.9869f, -89.24f));
        }


        if (Direction2.Equals(1))
        {
            Rb2.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction2.Equals(2))
        {
            Rb2.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction2.Equals(3))
        {
            Rb2.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction2.Equals(4))
        {
            Rb2.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction2.Equals(6))
        {
            Rb2.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction2.Equals(7))
        {
            Rb2.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction2.Equals(8))
        {
            Rb2.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction2.Equals(5))
        {
            Rb2.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction2.Equals(9))
        {
            Rb2.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction2.Equals(10))
        {
            Rb2.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction2.Equals(11))
        {
            Rb2.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction2.Equals(12))
        {
            Rb2.AddForce(V * new Vector2(178.9869f, -89.24f));
        }


        if (Direction3.Equals(1))
        {
            Rb3.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction3.Equals(2))
        {
            Rb3.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction3.Equals(3))
        {
            Rb3.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction3.Equals(4))
        {
            Rb3.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction3.Equals(6))
        {
            Rb3.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction3.Equals(7))
        {
            Rb3.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction3.Equals(8))
        {
            Rb3.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction3.Equals(5))
        {
            Rb3.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction3.Equals(9))
        {
            Rb1.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction3.Equals(10))
        {
            Rb3.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction3.Equals(11))
        {
            Rb3.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction3.Equals(12))
        {
            Rb3.AddForce(V * new Vector2(178.9869f, -89.24f));
        }


        if (Direction4.Equals(1))
        {
            Rb4.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction4.Equals(2))
        {
            Rb4.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction4.Equals(3))
        {
            Rb4.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction4.Equals(4))
        {
            Rb4.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction4.Equals(6))
        {
            Rb4.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction4.Equals(7))
        {
            Rb4.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction4.Equals(8))
        {
            Rb4.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction4.Equals(5))
        {
            Rb4.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction4.Equals(9))
        {
            Rb4.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction4.Equals(10))
        {
            Rb4.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction4.Equals(11))
        {
            Rb4.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction4.Equals(12))
        {
            Rb4.AddForce(V * new Vector2(178.9869f, -89.24f));
        }

        if (Direction5.Equals(1))
        {
            Rb5.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction5.Equals(2))
        {
            Rb5.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction5.Equals(3))
        {
            Rb5.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction5.Equals(4))
        {
            Rb5.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction5.Equals(6))
        {
            Rb5.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction5.Equals(7))
        {
            Rb5.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction5.Equals(8))
        {
            Rb5.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction5.Equals(5))
        {
            Rb5.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction5.Equals(9))
        {
            Rb5.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction5.Equals(10))
        {
            Rb5.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction5.Equals(11))
        {
            Rb5.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction5.Equals(12))
        {
            Rb5.AddForce(V * new Vector2(178.9869f, -89.24f));
        }

        if (Direction6.Equals(1))
        {
            Rb6.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction6.Equals(2))
        {
            Rb6.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction6.Equals(3))
        {
            Rb6.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction6.Equals(4))
        {
            Rb6.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction6.Equals(6))
        {
            Rb6.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction6.Equals(7))
        {
            Rb6.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction6.Equals(8))
        {
            Rb6.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction6.Equals(5))
        {
            Rb6.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction6.Equals(9))
        {
            Rb6.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction6.Equals(10))
        {
            Rb6.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction6.Equals(11))
        {
            Rb6.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction6.Equals(12))
        {
            Rb6.AddForce(V * new Vector2(178.9869f, -89.24f));
        }

        if (Direction7.Equals(1))
        {
            Rb7.AddForce(V * new Vector2(200.0f, 0.0f));
        }
        if (Direction7.Equals(2))
        {
            Rb7.AddForce(V * new Vector2(0.0f, 200.0f));
        }
        if (Direction7.Equals(3))
        {
            Rb7.AddForce(V * new Vector2(-200.0f, 0.0f));
        }
        if (Direction7.Equals(4))
        {
            Rb7.AddForce(V * new Vector2(0.0f, -200.0f));
        }
        if (Direction7.Equals(6))
        {
            Rb7.AddForce(V * new Vector2(141.42f, -141.42f));
        }
        if (Direction7.Equals(7))
        {
            Rb7.AddForce(V * new Vector2(-141.42f, -141.42f));
        }
        if (Direction7.Equals(8))
        {
            Rb7.AddForce(V * new Vector2(-141.42f, 141.42f));
        }
        if (Direction7.Equals(5))
        {
            Rb7.AddForce(V * new Vector2(141.42f, 141.42f));
        }
        if (Direction7.Equals(9))
        {
            Rb7.AddForce(V * new Vector2(178.9869f, 89.24f));
        }
        if (Direction7.Equals(10))
        {
            Rb7.AddForce(V * new Vector2(-178.9869f, 89.24f));
        }
        if (Direction7.Equals(11))
        {
            Rb7.AddForce(V * new Vector2(-178.9869f, -89.24f));
        }
        if (Direction7.Equals(12))
        {
            Rb7.AddForce(V * new Vector2(178.9869f, -89.24f));
        }
        B1.GetComponent <Ball> ().Direction = Direction1;
        B2.GetComponent <Ball> ().Direction = Direction2;
        B3.GetComponent <Ball> ().Direction = Direction3;
        B4.GetComponent <Ball> ().Direction = Direction4;
        B5.GetComponent <Ball> ().Direction = Direction5;
        B6.GetComponent <Ball> ().Direction = Direction6;
        B7.GetComponent <Ball> ().Direction = Direction7;

        other.GetComponent <Rigidbody2D>().Sleep();
    }
    void Update()
    {
        if (respondio && waith < 200)
        {
            waith++;
        }
        else
        {
            waith     = 0;
            respondio = false;
        }
        if (planet > 8)
        {
            planet = 1;
        }
        if (A.getAns() && !respondio)
        {
            Debug.Log("A!!!");
            Respuesta = "A";
            isItCorrect();
            respondio = true;
        }
        else if (B.getAns() && !respondio)
        {
            Debug.Log("B¡!!");
            Respuesta = "B";
            isItCorrect();
            respondio = true;
        }
        else if (C.getAns() && !respondio)
        {
            Debug.Log("C¡!!");
            Respuesta = "C";
            isItCorrect();
            respondio = true;
        }

        // preguntas Mercurio
        if (planet == Mer)
        {
            setRespFalse();
            A1.SetActive(true);
            B1.SetActive(true);
            C1.SetActive(true);

            CurrentPos = Mercurio;
            timmer     = 0;

            //saludar
            if (!Boolwait && saludar)
            {
                setAudFalse();
                AuHola.SetActive(true);
                saludar = false;
                Wait(1.2f);
            }
            else if (!Boolwait && pista != 1)
            {
                setAudFalse();
                Au1Pr.SetActive(true);

                //pista
                pista = pista * -1;
                Wait(15);
            }
            if (!Boolwait && pista == 1)
            {
                setAudFalse();
                Au1Pi.SetActive(true);
                pista = pista * -1;
                Wait(8);
            }
            //esperar
        }

        if (planet == Ven)
        {
            setRespFalse();
            A2.SetActive(true);
            B2.SetActive(true);
            C2.SetActive(true);
            CurrentPos = Venus;
            timmer     = 0;

            if (!Boolwait && pista2 != 1)
            {
                //pregunta
                pista2 = pista2 * -1;
                setAudFalse();
                Au2Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista2 == 1)
            {
                //pista
                pista2 = pista2 * -1;
                setAudFalse();
                Au2Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Tie)
        {
            setRespFalse();
            A3.SetActive(true);
            B3.SetActive(true);
            C3.SetActive(true);
            CurrentPos = Tierra;
            timmer     = 0;

            if (!Boolwait && pista3 != 1)
            {
                //pregunta
                pista3 = pista3 * -1;
                setAudFalse();
                Au3Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista3 == 1)
            {
                //pista
                pista3 = pista3 * -1;
                setAudFalse();
                Au3Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Mar)
        {
            setRespFalse();
            A4.SetActive(true);
            B4.SetActive(true);
            C4.SetActive(true);
            CurrentPos = Marte;
            timmer     = 0;

            if (!Boolwait && pista4 != 1)
            {
                //pregunta
                pista4 = pista4 * -1;
                setAudFalse();
                Au4Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista4 == 1)
            {
                //pista
                pista4 = pista4 * -1;
                setAudFalse();
                Au4Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Jup)
        {
            setRespFalse();
            A5.SetActive(true);
            B5.SetActive(true);
            C5.SetActive(true);
            CurrentPos = Jupiter;
            timmer     = 0;

            if (!Boolwait && pista5 != 1)
            {
                //pregunta
                pista5 = pista5 * -1;
                setAudFalse();
                Au5Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista5 == 1)
            {
                //pista
                pista5 = pista5 * -1;
                setAudFalse();
                Au5Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Sat)
        {
            setRespFalse();
            A6.SetActive(true);
            B6.SetActive(true);
            C6.SetActive(true);
            CurrentPos = Saturno;
            timmer     = 0;

            if (!Boolwait && pista6 != 1)
            {
                //pregunta
                pista6 = pista6 * -1;
                setAudFalse();
                Au6Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista6 == 1)
            {
                //pista
                pista6 = pista6 * -1;
                setAudFalse();
                Au6Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Nep)
        {
            setRespFalse();
            A7.SetActive(true);
            B7.SetActive(true);
            C7.SetActive(true);
            CurrentPos = Neptuno;
            timmer     = 0;

            if (!Boolwait && pista7 != 1)
            {
                //pregunta
                pista7 = pista7 * -1;
                setAudFalse();
                Au7Pr.SetActive(true);
                Wait(12);
            }
            if (!Boolwait && pista7 == 1)
            {
                //pista
                pista7 = pista7 * -1;
                setAudFalse();
                Au7Pi.SetActive(true);
                Wait(10);
            }
        }
        if (planet == Ura)
        {
            waitTime = waitTime + tres;
            tres     = 0;
            ganaste.SetActive(true);
            gano       = true;
            CurrentPos = Urano;
            timmer     = 0;

            if (!Boolwait && pista8 != 1)
            {
                //pregunta
                pista8 = pista8 * -1;
                setAudFalse();
                Au8Pr.SetActive(true);
                Wait(4);
            }
            if (!Boolwait && pista8 == 1)
            {
                //pista
                pista8 = pista8 * -1;
                setAudFalse();
                Au8Pi.SetActive(true);
                Wait(4);
            }
        }
        ShoulIWait();
        if (!Boolwait && gano)
        {
            SceneManager.LoadScene("Menu");
        }
        transform.localPosition = Vector3.Lerp(transform.localPosition, CurrentPos.position, 0.1f);
        transform.localRotation = Quaternion.Slerp(transform.localRotation, CurrentPos.rotation, 0.1f);
    }