Exemple #1
0
    // Use this for initialization
    void Start()
    {
        //进入到游戏逻辑
        Debug.Log("进入游戏逻辑");
        if (!m_EditorManualDebugConfig)
        {
            LoadDebugConfig();
        }
        else
        {
            Debug.LogWarning("跳过了调试配置,将会使用Inspector的默认配置");
        }

        CallPlatform.callFunc("Push", "hello");
        //加载逻辑组件
        if (m_Game == null)
        {
            bool ok = InitLogicPlugin();
            if (!ok)
            {
                Debug.LogError("InitLogicPlugin failed");
                return;
            }
        }
        Debug.LogWarning("改变系统日志开关:" + m_EnableLog);
        Debug.unityLogger.logEnabled = m_EnableLog;

        if (m_Game != null)
        {
            m_Game.Start();
        }
    }
Exemple #2
0
    public override void OnPlatformMessage(string msg)
    {
        Debug.Log("被动收到来自平台的消息:" + msg);
        string data = CallPlatform.callFunc("GetPlatformString", null);

        Debug.Log("主动请求平台消息:" + data);
    }