Beispiel #1
0
        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            WorkerArgs args = (WorkerArgs)e.Argument;

            while (!backgroundWorker.CancellationPending)
            {
                ms.Update();
                f1.UpdatePlayerState();
                f2.UpdatePlayerState();
                if (args.runBot)
                {
                    bot.Run();
                }
                backgroundWorker.ReportProgress(0, bot.getStatus());
                if (args.runOverlay)
                {
                    roundTimer.Text = bot.getStatus();
                    UpdateOverlay(player1, f1);
                    UpdateOverlay(player2, f2);
                }
            }
            e.Cancel = true;
        }
Beispiel #2
0
 private static void UpdateOverlay(TextLabel label, FighterState f)
 {
     f.UpdatePlayerState();
     label.Text = String.Format("X={0,-7} Y={1,-7} XVel={12,-7} YVel={13,-7}\n{2,-15} F:{3,-3}\nACT:{4,-3} ENDACT:{5,-3} IASA:{6,-3} TOT:{7,-3}\n{8,-10} {9,-10} {10,-10} {11:X}\n{14}",
                                f.X, f.Y, f.ScriptName, f.ScriptFrame, f.ScriptFrameHitboxStart, f.ScriptFrameHitboxEnd, f.ScriptFrameIASA, f.ScriptFrameTotal, f.State, f.AState, f.StateTimer, f.RawState, f.XVelocity, f.YVelocity, String.Join(", ", f.ActiveCancelLists));
 }