示例#1
0
 private LayoutController()
 {
     base.id         = ControllerID.LayoutController;
     layoutAssetDict = new Dictionary <LayoutID, List <Dictionary <string, MyRectTransform> > >();
     InitLayoutData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#2
0
 private FightController()
 {
     base.id   = ControllerID.FightController;
     checkList = new List <List <int> >();
     workList  = new List <List <int> >();
     dataBase  = new List <DivisionDataBase>();
     InitFightData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
 private TextColorController()
 {
     base.id          = ControllerID.SkinController;
     defaultColorDict = new Dictionary <string, string[]>();
     greenColorDict   = new Dictionary <string, string[]>();
     pinkColorDict    = new Dictionary <string, string[]>();
     blueColorDict    = new Dictionary <string, string[]>();
     InitColorData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#4
0
 private GuiController()
 {
     base.id          = ControllerID.GuiController;
     frameAddressDict = new Dictionary <GuiFrameID, string>();
     frameDict        = new Dictionary <GuiFrameID, Object>();
     itemAddressDict  = new Dictionary <GuiItemID, string>();
     itemDict         = new Dictionary <GuiItemID, Object>();
     guiFrameStack    = new Stack <GuiFrameWrapper>();
     root             = GameObject.Find("UIRoot");
     InitGuiData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#5
0
 private RecordController()
 {
     base.id = ControllerID.RecordController;
     saveDir = Application.persistentDataPath + "/Save";
     if (!Directory.Exists(saveDir))
     {
         Directory.CreateDirectory(saveDir);
     }
     fileFullName = saveDir + "/{0}.sav";
     InitRecordData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
 private AchievementController()
 {
     base.id = ControllerID.AchievementController;
     InitAchievementData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
    private BluetoothController()
    {
        base.id = ControllerID.BluetoothController;

        MyDebug.LogWhite("Loading Controller:" + id.ToString());
    }
示例#8
0
 private LanguageController()
 {
     base.id = ControllerID.MutiLanguageController;
     InitLanguageData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#9
0
    private void ConnectToPeripheral(BaseEventData evenData)
    {
        MyDebug.LogGreen("ConnectToPeripheral");
        BluetoothLEHardwareInterface.StopScan();
        BluetoothController.Instance.CurPeripheralInstance = content;
        bluetoothConnectWaiting.SetActive(true);
        StartCoroutine(ConnectCountDown());
        BluetoothLEHardwareInterface.ConnectToPeripheral(BluetoothController.Instance.CurPeripheralInstance.address, null, null,
                                                         (address, serviceUUID, characteristicUUID) =>
        {
            MyDebug.LogGreen("_Address:" + address);
            MyDebug.LogGreen("_ServiceUUID:" + serviceUUID);
            MyDebug.LogGreen("_CharacteristicUUID:" + characteristicUUID);

            if (BluetoothController.Instance.IsEqualUUID(serviceUUID, BluetoothController.Instance.ServiceUUID))
            {
                MyDebug.LogGreen("Address:" + address);
                MyDebug.LogGreen("ServiceUUID:" + serviceUUID);

                if (BluetoothController.Instance.IsEqualUUID(characteristicUUID, BluetoothController.Instance.ReadUUID))
                {
                    MyDebug.LogGreen("CharacteristicUUID:" + characteristicUUID);
                    receiveReadID = true;
                    if (receiveWriteID)
                    {
                        receiveReadID  = false;
                        receiveWriteID = false;
                        StartCoroutine(SubscribeCharacteristic());
                    }
                }
                else if (BluetoothController.Instance.IsEqualUUID(characteristicUUID, BluetoothController.Instance.WriteUUID))
                {
                    MyDebug.LogGreen("CharacteristicUUID:" + characteristicUUID);
                    receiveWriteID = true;
                    if (receiveReadID)
                    {
                        receiveReadID  = false;
                        receiveWriteID = false;
                        StartCoroutine(SubscribeCharacteristic());
                    }
                }
            }
        },
                                                         (address) =>
        {
            // this will get called when the device disconnects
            // be aware that this will also get called when the disconnect
            // is called above. both methods get call for the same action
            // this is for backwards compatibility
            if (GuiController.Instance.CurGUI == GuiFrameID.BluetoothFrame || GuiController.Instance.CurGUI == GuiFrameID.BluetoothFightFrame)
            {
                MyDebug.LogWhite("Peripheral Disconnect!");
                string tip = LanguageController.Instance.GetLanguage("Text_80019");
                GuiController.Instance.CurCommonTipInstance = new CommonTipInstance(CommonTipID.Single, tip);
                GuiController.Instance.SwitchWrapper(GuiFrameID.CommonTipFrame, true);
                if (GuiController.Instance.CurGUI == GuiFrameID.BluetoothFrame)
                {
                    StopAllCoroutines();
                    detailWin.SetActive(false);
                }
            }
        });
    }
示例#10
0
 private FontController()
 {
     base.id = ControllerID.FontController;
     path    = "Font/{0}/{1}";
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#11
0
 private RankController()
 {
     base.id = ControllerID.RankController;
     InitRankData();
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }
示例#12
0
 private SkinController()
 {
     base.id = ControllerID.SkinController;
     path    = "Skin/{0}/";
     MyDebug.LogWhite("Loading Controller:" + id.ToString());
 }