当前位置: 首页>>代码示例>>C#>>正文


C# Storage.SetTracker方法代码示例

本文整理汇总了C#中Storage.SetTracker方法的典型用法代码示例。如果您正苦于以下问题:C# Storage.SetTracker方法的具体用法?C# Storage.SetTracker怎么用?C# Storage.SetTracker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Storage的用法示例。


在下文中一共展示了Storage.SetTracker方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

    public void Start()
    {
        switch (traceFormat) {
        case "json":
            this.traceFormatter = new SimpleJsonFormat ();
            break;
        case "xapi":
            this.traceFormatter = new XApiFormat ();
            break;
        default:
            this.traceFormatter = new DefaultTraceFromat ();
            break;
        }
        filePath = GeneratePath ();
        switch (storageType) {
        case "net":
            filePath += "Pending";
            mainStorage = new NetStorage (this, host, trackingCode);
            mainStorage.SetTracker (this);
            backupStorage = new LocalStorage (filePath);
            backupStorage.SetTracker (this);
            break;
        default:
            mainStorage = new LocalStorage (filePath);
            mainStorage.SetTracker (this);
            break;
        }

        this.startListener.SetTraceFormatter (this.traceFormatter);
        this.Connect ();
        this.nextFlush = flushInterval;

        UnityEngine.Object.DontDestroyOnLoad (this);
    }
开发者ID:Synpheros,项目名称:eAdventure4Unity,代码行数:34,代码来源:Tracker.cs

示例2: Start

	public void Start ()
	{
		switch (traceFormat) {
		case "json":
			this.traceFormatter = new SimpleJsonFormat ();
			break;
		case "xapi":
			this.traceFormatter = new XApiFormat ();
			break;
		default:
			this.traceFormatter = new DefaultTraceFromat ();
			break;
		}
		switch (storageType) {
		case "net":
			storage = new NetStorage (this, host, trackingCode);
			break;
		default:
			String path = Application.persistentDataPath;
#if UNITY_ANDROID
			AndroidJavaObject env = new AndroidJavaObject("android.os.Environment");
			AndroidJavaObject file = env.CallStatic<AndroidJavaObject>("getExternalStorageDirectory");
			path = file.Call<String>("getAbsolutePath");
#endif
			if (!path.EndsWith ("/")) {
				path += "/";
			}
			path += "traces";
			if (debug) {
				Debug.Log ("Storing traces in " + path);
			}
			storage = new LocalStorage (path);
			break;
		}
		storage.SetTracker (this);
		this.startListener.SetTraceFormatter (this.traceFormatter);
		this.Connect ();
		this.nextFlush = flushInterval;

		UnityEngine.Object.DontDestroyOnLoad (this);
	}
开发者ID:gorco,项目名称:LaCortesiaDeEspa-a,代码行数:41,代码来源:Tracker.cs


注:本文中的Storage.SetTracker方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。