public void ToogleL() { VidNum_Type type = vidObj.type; switch (type) { case VidNum_Type.INT: vidObj.type = VidNum_Type.LONG; numberDataTypeText.text = "long"; break; case VidNum_Type.FLOAT: vidObj.type = VidNum_Type.INT; numberDataTypeText.text = "int"; break; case VidNum_Type.DOUBLE: vidObj.type = VidNum_Type.FLOAT; numberDataTypeText.text = "float"; break; case VidNum_Type.LONG: vidObj.type = VidNum_Type.DOUBLE; numberDataTypeText.text = "double"; break; } }
void Start() { base.Start(); if (vidObj != null && inField_Value != null && dataText != null) { inField_Value.text = vidObj.ToString(); dataText.text = inField_Value.text; } if (vidObj != null && numberDataTypeText != null) { VidNum_Type type = vidObj.type; switch (type) { case VidNum_Type.INT: numberDataTypeText.text = "int"; break; case VidNum_Type.FLOAT: numberDataTypeText.text = "float"; break; case VidNum_Type.DOUBLE: numberDataTypeText.text = "double"; break; case VidNum_Type.LONG: numberDataTypeText.text = "long"; break; } } }
public void toggleNum_type() { switch (type) { case VidNum_Type.INT: type = VidNum_Type.FLOAT; if (!setData(data)) { type = VidNum_Type.INT; } break; case VidNum_Type.FLOAT: type = VidNum_Type.DOUBLE; if (!setData(data)) { type = VidNum_Type.FLOAT; } break; case VidNum_Type.DOUBLE: type = VidNum_Type.LONG; if (!setData(data)) { type = VidNum_Type.DOUBLE; } break; case VidNum_Type.LONG: type = VidNum_Type.INT; if (!setData(data)) { type = VidNum_Type.LONG; } break; default: break; } }