Example #1
0
    private TargetDots GenerateTargets()
    {
        string _x_Dot1 = x_target_Dot1.GetComponent <InputField>().text;
        string _y_Dot1 = y_target_Dot1.GetComponent <InputField>().text;
        string _z_Dot1 = z_target_Dot1.GetComponent <InputField>().text;

        TargetDots dots = new TargetDots();

        if (int.TryParse(_x_Dot1, out int x_dot1))
        {
            dots.x_Dot1 = x_dot1;
        }

        if (int.TryParse(_y_Dot1, out int y_dot1))
        {
            dots.y_Dot1 = y_dot1;
        }

        if (int.TryParse(_z_Dot1, out int z_dot1))
        {
            dots.z_Dot1 = z_dot1;
        }

        return(dots);
    }
Example #2
0
 public void Draw(Inputs inputs, BaseDots dots, TargetDots targetDots)
 {
     DestroyInstantiated();
     GenerateCoordinates(inputs);
     DrawLine(
         arrayMap[targetDots.x_Dot1, targetDots.y_Dot1, targetDots.z_Dot1],
         arrayMap[dots.x_Dot1, dots.y_Dot1, dots.z_Dot1]);
     //DrawLine2(new Vector3(targetDots.x_Dot1, targetDots.y_Dot1, targetDots.z_Dot1));
     //DrawLine(arrayMap[6, 4, 1], arrayMap[3, 4, 1]);
     //DrawLine2(arrayMap[3, 4, 1], arrayMap[8, 2, 1]);
 }
Example #3
0
    public void Generate()
    {
        Inputs size = GenerateSize();

        if (size == null)
        {
            return;
        }
        BaseDots   dots       = GenerateBaseDots();
        TargetDots targetDots = GenerateTargets();

        gridManager.Draw(size, dots, targetDots);
    }