Exemple #1
0
        public double division(PointTest point)
        {
            double x = Double.Parse(point.x.ToString());
            double y = Double.Parse(point.y.ToString());

            return(x / y);
        }
 static void Main()
 {
     PointTest p = new PointTest();
         // Direct access to public members:
         p.x = 10;
         p.y = 15;
         Console.WriteLine("x = {0}, y = {1}", p.x, p.y);
 }
Exemple #3
0
    static void Main()
    {
        var p = new PointTest();

        // Direct access to public members.
        p.x = 10;
        p.y = 15;
        Console.WriteLine($"x = {p.x}, y = {p.y}");
    }
Exemple #4
0
        public void MultiplicacaoAtualizadaSucesso(int x, int y, int z)
        {
            var point     = new PointTest(30, 20);
            var operation = new Operation();

            var resultado = operation.multiplication(point);

            Assert.True((point.x * point.y) == resultado);
        }
Exemple #5
0
        public void SubtracaoSucesso()
        {
            var point     = new PointTest(30, 20);
            var operation = new Operation();

            var resultado = operation.subtraction(point);

            Assert.True((point.x - point.y) == resultado);
        }
Exemple #6
0
        public void SomaSucesso()
        {
            var point     = new PointTest(10, 20);
            var operation = new Operation();

            var resultado = operation.sum(point);

            Assert.True((point.x + point.y) == resultado);
        }
Exemple #7
0
    static void Main()
    {
        PointTest p = new PointTest();

        // Direct access to public members:
        p.x = 10;
        p.y = 15;
        Console.WriteLine("x = {0}, y = {1}", p.x, p.y);
    }
Exemple #8
0
        public void DivisaoSucesso()
        {
            var point     = new PointTest(25, 25);
            var operation = new Operation();

            var    resultado = operation.division(point);
            double x         = Double.Parse(point.x.ToString());
            double y         = Double.Parse(point.y.ToString());

            Assert.True((x / y) == resultado);
        }
Exemple #9
0
 void OnCollisionEnter(Collision other)
 {
     if (!hit)
     {
         Debug.Log("Collision Detected");
         if (GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().landmark != null)
         {
             if (this.transform.parent.gameObject.name == GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>().testObject.name)
             {
                 GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().Right_Answer.Play();
                 Debug.Log("You have reached the right destination!");
                 test            = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>();
                 test.testObject = null;
                 test.resetTime();
                 return;
             }
             else
             {
                 GameObject.FindGameObjectWithTag("CompassButton").GetComponent <Compass_Button>().Wrong_Answer.Play();
                 Debug.Log("You have reached the wrong destination!");
                 test            = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>();
                 test.testObject = null;
                 test.resetTime();
                 return;
             }
         }
         else
         {
             PointTest pt = GameObject.FindGameObjectWithTag("Player").GetComponent <PointTest>();
             pt.testObject    = null;
             pt.findText.text = "";
             jingle.Play();
             gameObject.GetComponent <Renderer>().material.color = Color.cyan;
             foreach (Renderer r in GetComponentsInChildren <Renderer>())
             {
                 r.material.color = Color.cyan;
             }
             recolorPeriod = recolorTime;
             hit           = true;
             return;
         }
     }
 }
Exemple #10
0
 public int sum(PointTest point)
 {
     return(point.x + point.y);
 }
Exemple #11
0
 public int subtraction(PointTest point)
 {
     return(point.x - point.y);
 }
Exemple #12
0
 public int multiplication(PointTest point)
 {
     return(point.x * point.y);
 }