예제 #1
0
파일: Level.cs 프로젝트: fawuser/IRMGARD
        /// <summary>
        /// Gets the next module if available.
        /// </summary>
        /// <returns>The next module.</returns>
        /// <param name="currentModule">Current module.</param>
        public Module GetNextModule(Module currentModule)
        {
            if (HasNextModule(currentModule))
            {
                var index = Modules.IndexOf (currentModule) + 1;
                return Modules.ElementAt(index);
            }

            return null;
        }
예제 #2
0
파일: Level.cs 프로젝트: fawuser/IRMGARD
        /// <summary>
        /// Gets the previoust module if available.
        /// </summary>
        /// <returns>The previous module.</returns>
        /// <param name="currentModule">Current module.</param>
        public Module GetPreviousModule(Module currentModule)
        {
            if (HasPreviousModule(currentModule))
            {
                var index = Modules.IndexOf(currentModule) - 1;
                return Modules.ElementAt(index);
            }

            return null;
        }
예제 #3
0
 public ModuleAdapter(Activity context, Module[] items)
     : base()
 {
     this.context = context;
     this.items = items;
 }
예제 #4
0
파일: Level.cs 프로젝트: fawuser/IRMGARD
 /// <summary>
 /// Determines whether there is a next module available from the provided module
 /// </summary>
 /// <returns><c>true</c> if this level has a next module; otherwise, <c>false</c>.</returns>
 /// <param name="currentModule">Current module.</param>
 public bool HasNextModule(Module currentModule)
 {
     var index = Modules.IndexOf(currentModule);
     return Modules.Count - 1 > index;
 }
예제 #5
0
파일: Level.cs 프로젝트: fawuser/IRMGARD
 /// <summary>
 /// Determines whether there is a previous module available from the provided module
 /// </summary>
 /// <returns><c>true</c> if this level has a previous module; otherwise, <c>false</c>.</returns>
 /// <param name="currentModule">Current module.</param>
 public bool HasPreviousModule(Module currentModule)
 {
     var index = Modules.IndexOf(currentModule);
     return index > 0;
 }