• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Levelup.Level类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Soomla.Levelup.Level的典型用法代码示例。如果您正苦于以下问题:C# Level类的具体用法?C# Level怎么用?C# Level使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Level类属于Soomla.Levelup命名空间,在下文中一共展示了Level类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: IncTimesPlayed

		/** LEVEL TIMES PLAYED **/

		public static int IncTimesPlayed(Level level) {
			return instance._incTimesPlayed (level);
		}
开发者ID:Bakiet,项目名称:UnityZombieCross,代码行数:5,代码来源:LevelStorage.cs


示例17: DecTimesPlayed

		public static int DecTimesPlayed(Level level){
			return instance._decTimesPlayed (level);
		} 
开发者ID:Bakiet,项目名称:UnityZombieCross,代码行数:3,代码来源:LevelStorage.cs


示例18: _setFastestDurationMillis

		/// <summary>
		/// Sets the fastest (given) duration for the given <c>Level</c>.
		/// </summary>
		/// <param name="level"><c>Level</c> to set fastest duration.</param>
		/// <param name="duration">Duration to set.</param>
		protected virtual void _setFastestDurationMillis(Level level, long duration) {
#if UNITY_EDITOR
			string key = keyFastestDuration (level.ID);
			string val = duration.ToString ();
			PlayerPrefs.SetString (key, val);
#endif
		}
开发者ID:Bakiet,项目名称:UnityZombieCross,代码行数:12,代码来源:LevelStorage.cs


示例19: _setFastestDurationMillis

	protected override void _setFastestDurationMillis(Level level, long duration) {
		levelStorage_SetFastestDurationMillis(level.ID, duration);
	}
开发者ID:Bakiet,项目名称:UnityZombieCross,代码行数:3,代码来源:LevelStorageIOS.cs


示例20: _getFastestDurationMillis

		/// <summary>
		/// Gets the fastest duration for the given <c>Level</c>.
		/// </summary>
		/// <returns>The fastest duration of the given <c>Level</c>.</returns>
		/// <param name="level"><c>Level</c> to get fastest duration.</param>
		protected virtual long _getFastestDurationMillis(Level level) {
#if UNITY_EDITOR
			string key = keyFastestDuration (level.ID);
			string val = PlayerPrefs.GetString (key);
			return (string.IsNullOrEmpty(val)) ? 0 : long.Parse (val);
#else
			return 0;
#endif
		}
开发者ID:Bakiet,项目名称:UnityZombieCross,代码行数:14,代码来源:LevelStorage.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Profile.Provider类代码示例发布时间:2022-05-26
下一篇:
C# Common.AnalysisConfig类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap