public void RegisterDifficultyNotch(CycGame dst, int difficulty)
{
float triggerTime = ((((int)Game.CurrentMeasure) / 4) + 1) * 4 - 1;
if (dst == TopGame)
{
//send a notch to the upper edge of the pipe
//warning magic number
EnemyNotch n = new EnemyNotch(this, UpPipeX, UpPipeStartY, 20);
//assumption: notches have uniform height
n.TargetY = topNotches.Count() * n.Height;
if (topNotches.Count() == 0)
{
n.TargetX = DownPipeX;
}
n.Duration = (float)((triggerTime - Game.CurrentMeasure)*(4.0/3.0));
topNotches.Add(n);
n.Initialize();
n.LoadContent();
}
else
{
//send a notch to the bottom edge of the pipe
EnemyNotch n = new EnemyNotch(this, DownPipeX, DownPipeStartY, 20);
n.TargetY = Height - bottomNotches.Count() * n.Height - 20 - PipeMargin;
n.TargetX = DownPipeX;
n.Duration = (float)((triggerTime - Game.CurrentMeasure) * (4.0 / 3.0));
bottomNotches.Add(n);
n.Initialize();
n.LoadContent();
}
}