Feel  5.0
The best way to improve your game's feel and make it extra juicy
MoreMountains.Tools.MMCircularList< T > Class Template Reference

A improved list that lets you parse it and automatically have it loop to the start or end when you reach the end or start To use it : set the CurrentIndex to whatever you want, then use IncrementCurrentIndex / DecrementCurrentIndex to move it, get the current element via Current More...

Inheritance diagram for MoreMountains.Tools.MMCircularList< T >:

Public Member Functions

virtual void IncrementCurrentIndex ()
 Increments the current index (towards the "right" of the list) More...
 
virtual void DecrementCurrentIndex ()
 Decrements the current index (towards the "left" of the list) More...
 

Public Attributes

virtual T Current => this[CurrentIndex]
 Returns the current element More...
 
virtual int PreviousIndex => (_currentIndex == 0) ? Count - 1 : _currentIndex - 1
 Returns the previous index in the circular list More...
 
virtual int NextIndex => (_currentIndex == Count - 1) ? 0 : _currentIndex + 1
 Returns the next index in the circular list More...
 

Protected Member Functions

virtual int GetCurrentIndex ()
 Computes the current index More...
 

Properties

int CurrentIndex [get, set]
 Lets you set the current index, or compute it if you get it More...
 

Detailed Description

A improved list that lets you parse it and automatically have it loop to the start or end when you reach the end or start To use it : set the CurrentIndex to whatever you want, then use IncrementCurrentIndex / DecrementCurrentIndex to move it, get the current element via Current

Template Parameters
T

Member Function Documentation

◆ DecrementCurrentIndex()

virtual void MoreMountains.Tools.MMCircularList< T >.DecrementCurrentIndex ( )
virtual

Decrements the current index (towards the "left" of the list)

◆ GetCurrentIndex()

virtual int MoreMountains.Tools.MMCircularList< T >.GetCurrentIndex ( )
protectedvirtual

Computes the current index

Returns

◆ IncrementCurrentIndex()

virtual void MoreMountains.Tools.MMCircularList< T >.IncrementCurrentIndex ( )
virtual

Increments the current index (towards the "right" of the list)

Member Data Documentation

◆ Current

virtual T MoreMountains.Tools.MMCircularList< T >.Current => this[CurrentIndex]

Returns the current element

◆ NextIndex

virtual int MoreMountains.Tools.MMCircularList< T >.NextIndex => (_currentIndex == Count - 1) ? 0 : _currentIndex + 1

Returns the next index in the circular list

◆ PreviousIndex

virtual int MoreMountains.Tools.MMCircularList< T >.PreviousIndex => (_currentIndex == 0) ? Count - 1 : _currentIndex - 1

Returns the previous index in the circular list

Property Documentation

◆ CurrentIndex

int MoreMountains.Tools.MMCircularList< T >.CurrentIndex
getset

Lets you set the current index, or compute it if you get it


The documentation for this class was generated from the following file: