Esempio n. 1
0
 private EngineBridge()
 {
     if (Platform.isAndroid())
     {
         bridge = BridgeAndroid.GetInstance();
     }
     else if (Platform.isIOS())
     {
         bridge = BridgeIOS.GetInstance();
     }
 }
Esempio n. 2
0
        static void engineBridgeDelegate(string resultJson)
        {
            Debug.Log("resultJson From IOS:" + resultJson);

            Result result = new Result(resultJson);

            Dictionary <string, Action <Result> > actionDic = BridgeIOS.GetInstance().GetDictionary();

            Action <Result> action = null;

            if (actionDic != null && actionDic.ContainsKey(result.callbackId))
            {
                action = actionDic[result.callbackId];
            }

            if (action != null)
            {
                action(result);
            }
        }