Initial Commit
This commit is contained in:
17
2DGAMELIB/_2DGAMELIB/ConstProp.cs
Normal file
17
2DGAMELIB/_2DGAMELIB/ConstProp.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace _2DGAMELIB;
|
||||
|
||||
public class ConstProp
|
||||
{
|
||||
private int c = -1;
|
||||
|
||||
public bool GetFlag(double Proportion)
|
||||
{
|
||||
c++;
|
||||
return c % (int)(1.0 / Proportion) == 0;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
c = -1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user