Exemple #1
0
    private void SetPositionMatrix(List <DatabaseUtilities.Column> diskInfo)
    {
        int amountOfDataTypes = diskInfo.Count;

        diskSlots = new Vector3[amountOfDataTypes];

        Vector3 startingPosition = new Vector3(0, 0, 0);
        float   previousScale    = -1f;

        for (int i = 0; i < amountOfDataTypes; i++)
        {
            DatabaseUtilities.Column currentInfo = diskInfo[i];

            //Convert string in 1st field parameter into float
            float scaleSize = float.Parse(currentInfo.fields[0]);

            if (i == 0)
            {
                diskSlots[i]  = startingPosition;
                previousScale = scaleSize;
            }
            else
            {
                float newYUpdate = previousScale + scaleSize;
                startingPosition += new Vector3(0, newYUpdate, 0);
                previousScale     = scaleSize;
                diskSlots[i]      = startingPosition;
            }
        }
    }
Exemple #2
0
    private static GameObject GenerateColumnObj(DatabaseUtilities.Column col, Transform parent, int key)
    {
        GameObject curCol = Generate((int)View_Type.Column);

        curCol.GetComponent <Column>().Initialize(key, parent, col.GetName(), col.GetId(), col.GetColor());

        return(curCol);
    }
Exemple #3
0
    private static GameObject GenerateDiskObj(DatabaseUtilities.Column cylinderInfo, Transform harness)
    {
        //Generate Disk object from factory.
        GameObject disk = Generate((int)View_Type.Disk);

        float  scaleSize    = float.Parse(cylinderInfo.fields[0]);
        string dataTypeName = cylinderInfo.GetName();
        string hexColor     = cylinderInfo.GetColor();

        //Initialize the disk object...
        disk.GetComponent <Disk>().Initialize(harness, dataTypeName, hexColor, scaleSize);

        return(disk);
    }