예제 #1
0
    protected override void OnDropdownClick(Dropdown dpd)
    {
        base.OnDropdownClick(dpd);
        switch (dpd.name)
        {
        case "PatternDropdown":
            curPatternID = (PatternID)dpd.value;
            RefreshAmountDropdown(dpd.value);
            break;

        case "AmountDropdown":
            curAmountID = (AmountID)dpd.value;
            break;

        case "SymbolDropdown":
            curSymbolID = (SymbolID)dpd.value;
            RefreshDigitDropdown(dpd.value);
            break;

        case "DigitDropdown":
            curDigitID = (DigitID)(dpd.value + delta);
            break;

        case "OperandDropdown":
            curOperandID = (OperandID)dpd.value;
            break;

        default:
            MyDebug.LogYellow("Can not find Dropdown: " + dpd.name);
            break;
        }
    }
    void Start()
    {
        BluetoothLEHardwareInterface.BluetoothEnable(true);
        id = GuiFrameID.BluetoothFrame;
        Init();
        delta                    = 0;
        scaning                  = false;
        curPatternID             = PatternID.Number;
        curOperandID             = OperandID.TwoNumbers;
        peripheralDict           = new Dictionary <string, string> ();
        digitDropdownOptionsList = new List <Dropdown.OptionData>(digitDropdown.options);

#if UNITY_ANDROID
        bluetoothPeripheralBtn.SetActive(false);
        bluetoothAndroidTip.SetActive(true);
#elif UNITY_IOS
        bluetoothPeripheralBtn.SetActive(true);
        bluetoothAndroidTip.SetActive(false);
#endif
    }
예제 #3
0
 public CategoryInstance(PatternID patternID, AmountID amountID, SymbolID symbolID, DigitID digitID, OperandID operandID)
 {
     this.patternID = patternID;
     this.amountID  = amountID;
     this.symbolID  = symbolID;
     this.digitID   = digitID;
     this.operandID = operandID;
 }