MotV => MotionBase, FPS -> FpsCounter

This commit is contained in:
2026-06-14 01:00:43 +02:00
parent 892132e1af
commit cd8ba47564
13 changed files with 80 additions and 80 deletions

View File

@@ -3,7 +3,7 @@ using System.Diagnostics;
namespace _2DGAMELIB
{
public class FPS
public class FpsCounter
{
public Stopwatch sw = new Stopwatch();
@@ -11,7 +11,7 @@ namespace _2DGAMELIB
public double Value;
private double ticks_per_frame;
public FPS(double FPS)
public FpsCounter(double FPS)
{
Value = FPS;
ticks_per_frame = (double)Stopwatch.Frequency / FPS;

View File

@@ -30,7 +30,7 @@ namespace _2DGAMELIB
public Graphics HitGraphics;
public SceneFader SceneFader;
public FPS FPSF = new FPS(60.0);
public FpsCounter FPSF = new FpsCounter(60.0);
private Size BaseSize = Size.Empty;
private Vector2D resVector = DataConsts.Vec2DZero;

View File

@@ -25,7 +25,7 @@ namespace _2DGAMELIB
{
};
public Action<FPS> Draw = delegate
public Action<FpsCounter> Draw = delegate
{
};

View File

@@ -2,7 +2,7 @@ using System;
namespace _2DGAMELIB
{
public class Motion : MotV
public class Motion : MotionBase
{
public Action<Motion> OnStart;
@@ -25,7 +25,7 @@ namespace _2DGAMELIB
{
}
public new void GetValue(FPS FPS)
public new void GetValue(FpsCounter FPS)
{
if (!run)
{

View File

@@ -1,6 +1,6 @@
namespace _2DGAMELIB
{
public class MotV
public class MotionBase
{
public double Value;
@@ -58,7 +58,7 @@ namespace _2DGAMELIB
}
}
public MotV(double Min, double Max)
public MotionBase(double Min, double Max)
{
min = Min;
max = Max;
@@ -78,13 +78,13 @@ namespace _2DGAMELIB
Value = min;
}
private void Count(FPS FPS)
private void Count(FpsCounter FPS)
{
m = Frame / FPS.Value;
Value += (m * d + m * LowestIncrease) * BaseSpeed * ((s > 0) ? GotoSpeed : RetuSpeed) * (double)s;
}
public void GetValue(FPS FPS)
public void GetValue(FpsCounter FPS)
{
if (!((double)(FPS.sw.ElapsedMilliseconds - st) < Interval) && FPS.Value > 0.0)
{

View File

@@ -35,7 +35,7 @@ namespace _2DGAMELIB
ms.Remove(Name);
}
public void Drive(FPS FPS)
public void Drive(FpsCounter FPS)
{
foreach (Motion value in ms.Values)
{

View File

@@ -23,7 +23,7 @@ namespace _2DGAMELIB
{
};
private MotV mv;
private MotionBase mv;
private bool f1;
@@ -162,7 +162,7 @@ namespace _2DGAMELIB
this.Action = Action;
SetParT(Name, ref Position, Size, Width, Height, Font, TextSize, Text, ref TextColor, ref ShadColor, ref BackColor);
SetFeed(Name, Size, ref FeedColor);
mv = new MotV(0.0, 255.0);
mv = new MotionBase(0.0, 255.0);
mv.BaseSpeed = 2.0;
}
@@ -258,7 +258,7 @@ namespace _2DGAMELIB
_shapePartT.HitColor = Med.GetUniqueColor();
}
public void Progression(FPS FPS)
public void Progression(FpsCounter FPS)
{
if (!f1)
{