Exemplo n.º 1
0
    private void SelectCubeType()
    {
        cubeTypes = new string[(int)CubeTypes.ChaosBall + 1];

        for (int i = 1; i <= (int)CubeTypes.ChaosBall; i++)
        {
            cubeTypesLength = (CubeTypes)i;
            cubeTypes[i]    = cubeTypesLength.ToString();
        }

        cubeTypeIndex = EditorGUI.Popup(new Rect(0, 40, position.width, 20), "Cube Type : ", cubeTypeIndex, cubeTypes);

        LevelEditor.instance.currentCube = (CubeTypes)cubeTypeIndex;
    }
Exemplo n.º 2
0
        public static CubeTypes ConvertStringToCubeType(string cubetypes)
        {
            CubeTypes cubeType = CubeTypes.None;

            for (int i = 0; i < (int)CubeTypes.Count; i++)
            {
                cubeType = (CubeTypes)i;

                if (cubeType.ToString() == cubetypes)
                {
                    break;
                }
            }
            return(cubeType);
        }
 // called on button press
 public void ChangeCubeSelection()
 {
     UIManager.instance.ButtonCallback("LEVELEDITOR_isPlacing");
     Debug.Log("You've pressed " + selectedCubeType.ToString());
     LevelEditor.instance.currentCube = selectedCubeType;
 }
Exemplo n.º 4
0
 public static string ConvertTypeToString(CubeTypes cubetypes)
 {
     return(cubetypes.ToString());
 }