當前位置: 首頁>>代碼示例>>C#>>正文


C# Levelup.Level類代碼示例

本文整理匯總了C#中Soomla.Levelup.Level的典型用法代碼示例。如果您正苦於以下問題:C# Level類的具體用法?C# Level怎麽用?C# Level使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Level類屬於Soomla.Levelup命名空間,在下文中一共展示了Level類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: _setFastestDurationMillis

		protected override void _setFastestDurationMillis(Level level, long duration) {
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniLevelStorage = new AndroidJavaClass("com.soomla.levelup.data.LevelStorage")) {
				jniLevelStorage.CallStatic("setFastestDurationMillis", level.ID, duration);
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
		}
開發者ID:Ratel13,項目名稱:unity3d-levelup,代碼行數:7,代碼來源:LevelStorageAndroid.cs

示例2: _getFastestDurationMillis

		protected override long _getFastestDurationMillis(Level level) {
			long duration = 0;
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniLevelStorage = new AndroidJavaClass("com.soomla.levelup.data.LevelStorage")) {
				duration = jniLevelStorage.CallStatic<long>("getFastestDurationMillis", level.ID);
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
			return duration;
		}
開發者ID:Ratel13,項目名稱:unity3d-levelup,代碼行數:9,代碼來源:LevelStorageAndroid.cs

示例3: _getSlowestDurationMillis

 /// <summary>
 /// Retrieves the slowest duration for the given level.
 /// </summary>
 /// <returns>The slowest duration of the given <c>Level</c>.</returns>
 /// <param name="level"><c>Level</c> to get slowest duration.</param>
 protected virtual long _getSlowestDurationMillis(Level level)
 {
     string key = keySlowestDuration (level.ID);
     string val = KeyValueStorage.GetValue (key);
     return (string.IsNullOrEmpty(val)) ? 0 : long.Parse (val);
 }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:11,代碼來源:LevelStorage.cs

示例4: onLevelEnded

		public void onLevelEnded(Level level)
		{
			onEventFired (level, System.Reflection.MethodBase.GetCurrentMethod ().Name);
		}
開發者ID:Ratel13,項目名稱:unity3d-levelup,代碼行數:4,代碼來源:LevelTest.cs

示例5: _decTimesStarted

		protected override int _decTimesStarted(Level level) {
			int timesStarted = 0;
			AndroidJNI.PushLocalFrame(100);
			using(AndroidJavaClass jniLevelStorage = new AndroidJavaClass("com.soomla.levelup.data.LevelStorage")) {
				timesStarted = jniLevelStorage.CallStatic<int>("decTimesStarted", level.ID);
			}
			AndroidJNI.PopLocalFrame(IntPtr.Zero);
			return timesStarted;
		}
開發者ID:Ratel13,項目名稱:unity3d-levelup,代碼行數:9,代碼來源:LevelStorageAndroid.cs

示例6: _decTimesPlayed

	protected override int _decTimesPlayed(Level level) {
		return levelStorage_DecTimesPlayed(level.ID);
	} 
開發者ID:Bakiet,項目名稱:UnityZombieCross,代碼行數:3,代碼來源:LevelStorageIOS.cs

示例7: _getFastestDurationMillis

	protected override long _getFastestDurationMillis(Level level) {
		return levelStorage_GetFastestDurationMillis(level.ID);
	}
開發者ID:Bakiet,項目名稱:UnityZombieCross,代碼行數:3,代碼來源:LevelStorageIOS.cs

示例8: GetTimesPlayed

		public static int GetTimesPlayed(Level level) {
			return instance._getTimesPlayed (level);
		}
開發者ID:Bakiet,項目名稱:UnityZombieCross,代碼行數:3,代碼來源:LevelStorage.cs

示例9: GetTimesCompleted

		public static int GetTimesCompleted(Level level) {
			return instance._getTimesCompleted (level);
		}
開發者ID:Bakiet,項目名稱:UnityZombieCross,代碼行數:3,代碼來源:LevelStorage.cs

示例10: DecTimesCompleted

		public static int DecTimesCompleted(Level level){
			return instance._decTimesCompleted (level);
		} 
開發者ID:Bakiet,項目名稱:UnityZombieCross,代碼行數:3,代碼來源:LevelStorage.cs

示例11: _setSlowestDurationMillis

 /** Unity-Editor Functions **/
 /// <summary>
 /// Sets the slowest (given) duration for the given level.
 /// </summary>
 /// <param name="level"><c>Level</c> to set slowest duration.</param>
 /// <param name="duration">Duration to set.</param>
 protected virtual void _setSlowestDurationMillis(Level level, long duration)
 {
     string key = keySlowestDuration (level.ID);
     string val = duration.ToString ();
     KeyValueStorage.SetValue (key, val);
 }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:12,代碼來源:LevelStorage.cs

示例12: _incTimesStarted

        /// <summary>
        /// Increases by 1 the number of times the given <c>Level</c> has been started. 
        /// </summary>
        /// <returns>The number of times started after increasing.</returns>
        /// <param name="level"><c>Level</c> to increase its times started.</param>
        protected virtual int _incTimesStarted(Level level)
        {
            int started = _getTimesStarted(level);
            if (started < 0) { /* can't be negative */
                started = 0;
            }
            string startedStr = (started + 1).ToString();
            string key = keyTimesStarted(level.ID);
            KeyValueStorage.SetValue (key, startedStr);

            // Notify level has started
            LevelUpEvents.OnLevelStarted (level);

            return started + 1;
        }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:20,代碼來源:LevelStorage.cs

示例13: _incTimesPlayed

        /// <summary>
        /// Increases by 1 the number of times the given <c>Level</c> has been played. 
        /// </summary>
        /// <returns>The number of times played after increasing.</returns>
        /// <param name="level"><c>Level</c> to increase its times played.</param>
        protected virtual int _incTimesPlayed(Level level)
        {
            int played = _getTimesPlayed(level);
            if (played < 0) { /* can't be negative */
                played = 0;
            }
            string playedStr = (played + 1).ToString();
            string key = keyTimesPlayed(level.ID);
            KeyValueStorage.SetValue (key, playedStr);

            // Notify level has ended
            LevelUpEvents.OnLevelEnded (level);

            return played + 1;
        }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:20,代碼來源:LevelStorage.cs

示例14: _incTimesCompleted

        /// <summary>
        /// Increases by 1 the number of times the given <c>Level</c> has been played. 
        /// </summary>
        /// <returns>The number of times played after increasing.</returns>
        /// <param name="level"><c>Level</c> to increase its times played.</param>
        protected virtual int _incTimesCompleted(Level level)
        {
            int completed = _getTimesCompleted(level);
            if (completed < 0) { /* can't be negative */
                completed = 0;
            }
            string completedStr = (completed + 1).ToString();
            string key = keyTimesCompleted(level.ID);
            KeyValueStorage.SetValue (key, completedStr);

            return completed + 1;
        }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:17,代碼來源:LevelStorage.cs

示例15: _getTimesStarted

        /// <summary>
        /// Retrieves the number of times this <c>Level</c> has been started. 
        /// </summary>
        /// <returns>The number of times started.</returns>
        /// <param name="level"><c>Level</c> whose times started is to be retrieved.</param>
        protected virtual int _getTimesStarted(Level level)
        {
            string key = keyTimesStarted(level.ID);
            string val = KeyValueStorage.GetValue (key);

            int started = 0;
            if (!string.IsNullOrEmpty(val)) {
                started = int.Parse(val);
            }

            return started;
        }
開發者ID:00christian00,項目名稱:unity3d-levelup,代碼行數:17,代碼來源:LevelStorage.cs


注:本文中的Soomla.Levelup.Level類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。