void ScaleRenderer(double scale) { HugeBawls.ScaleRenderer(scale); tbRenderer.Value = (int)(tbRenderer.Maximum / scale); txtRenderer.Text = String.Format("{0}", HugeBawls.RenderRegulator.Interval()); }
void ScaleUpdate(double scale) { HugeBawls.ScaleUpdate(scale); tbUpdate.Value = (int)(tbUpdate.Maximum / scale); txtUpdate.Text = String.Format("{0}", HugeBawls.UpdateRegulator.Interval()); }
public static void ScaleRenderer(double scale) { HugeBawls.Pause(); s_RenderRegulator.Disable(); s_RenderRegulator.Dispose(); s_RenderRegulator = new Regulator((int)(Settings.PeriodRender * scale)); HugeBawls.Run(); }
public static void ScaleUpdate(double scale) { HugeBawls.Pause(); s_UpdateRegulator.Disable(); s_UpdateRegulator.Dispose(); s_UpdateRegulator = new Regulator((int)(Settings.PeriodUpdate * scale)); HugeBawls.Run(); }
private void btnPlayPause_Click(object sender, EventArgs e) { if (HugeBawls.Running) { HugeBawls.Pause(); btnPlayPause.Text = "&Play"; } else { HugeBawls.Run(); btnPlayPause.Text = "Sto&p"; } }
public static void InitializePartitions() { s_Partitions = new Partition <Vehicle> [s_NumPartitions, s_NumPartitions]; for (int i = 0; i < s_NumPartitions; i++) { for (int j = 0; j < s_NumPartitions; j++) { s_Partitions[i, j] = new Partition <Vehicle>(i, j, s_PartitionSizeI, s_PartitionSizeJ); } } VisibleEntities = new Dictionary <string, List <Vehicle> >(); foreach (Type type in HugeBawls.GetTypes("HugeBawls.Entities")) { VisibleEntities.Add( type.Name, new List <Vehicle>(Settings.NumEntities / (Settings.WorldPartitions * Settings.WorldPartitions))); } }
public UI() { InitializeComponent(); s_TextBox = txtConsole; this.SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true); Initialize(); HugeBawls.Initialize(); SetDefaults(); InitializeToolbox(); s_Pointer = new Entities.Pointer(this, btnCursor.Image); pbxMain.Cursor = s_Pointer.CursorFromImage(btnCursor.Image); }
private void tlsRandomize_Click(object sender, EventArgs e) { HugeBawls.Reset(); HugeBawls.Randomize(); }
private void btnClear_Click(object sender, EventArgs e) { HugeBawls.Reset(); txtConsole.Clear(); }
private void timerMain_Tick(object sender, EventArgs e) { HugeBawls.Update((double)timerMain.Interval); }