git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1295 993157c7-ee19-0410-b2c4-bb4e9862e678
This commit is contained in:
@@ -23,31 +23,31 @@ namespace OpenRa.Game
|
||||
{
|
||||
currentSequence = SequenceProvider.GetSequence( name, sequenceName );
|
||||
frame = 0;
|
||||
//tickFunc = delegate
|
||||
//{
|
||||
// ++frame;
|
||||
// if( frame >= currentSequence.Length )
|
||||
// {
|
||||
// frame = currentSequence.Length - 1;
|
||||
// tickFunc = delegate { };
|
||||
// }
|
||||
//};
|
||||
tickFunc = delegate
|
||||
{
|
||||
++frame;
|
||||
if( frame >= currentSequence.Length )
|
||||
{
|
||||
frame = currentSequence.Length - 1;
|
||||
tickFunc = delegate { };
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public void PlayRepeating( string sequenceName )
|
||||
{
|
||||
currentSequence = SequenceProvider.GetSequence( name, sequenceName );
|
||||
frame = 0;
|
||||
//tickFunc = delegate
|
||||
//{
|
||||
// frame = ( frame + 1 ) % currentSequence.Length;
|
||||
//};
|
||||
tickFunc = delegate
|
||||
{
|
||||
frame = ( frame + 1 ) % currentSequence.Length;
|
||||
};
|
||||
}
|
||||
|
||||
Action<double> tickFunc;
|
||||
public void Tick( double t )
|
||||
{
|
||||
//tickFunc( t );
|
||||
tickFunc( t );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user