public void AddRequiredHit(GameObject ob, float required_col_time) { ObjectTimer ot = new ObjectTimer(); ot.obj = ob; ot.timer = required_col_time; required_col.Add(ot); }
} // end AudioManager public void Update(float deltaTime) { int count = objQueue.Count; for (int i = 0; i < count; i++) { ObjectTimer timer = objQueue.Dequeue(); if (timer.IsOverTime(deltaTime)) continue; // end if objQueue.Enqueue(timer); } // end for } // end Update
public void AddRequiredHit(GameObject ob, float required_col_time) { Debug.Log("AddRequiredHit: " + ob.name + " to ch " + m_iCheckPoint.ToString()); ObjectTimer ot = new ObjectTimer(); ot.obj = ob; ot.timer = required_col_time; required_col.Add(ot); }
private void buttonDisconn_Click(object sender, EventArgs e) { Gecko.Disconnect(); groupBox2.Enabled = false; groupBox3.Enabled = false; groupBox4.Enabled = false; buttonDisconn.Enabled = false; buttonConnect.Enabled = true; ObjectTimer.Stop(); mapCheckerTimer.Stop(); }
private void hammerheadBridgeBox_CheckedChanged(object sender, EventArgs e) { if (!checkBox1.Checked) { DialogResult dr = MessageBox.Show("This map will require the automatic poking feature to be turned on. Do you want to turn this feature on? (Note: this feature cannot be turned off as long as this map is selected)", "Notice", MessageBoxButtons.YesNo); if (dr == DialogResult.OK) { checkBox1.Checked = true; checkBox1.Enabled = false; if (hammerheadBridgeOrBox.Checked) { hammerheadBridgeOrBox.Checked = false; } if (hammerheadBridgeBox.Checked) { DialogResult dialogResult = MessageBox.Show("This version of Hammerhead Bridge has yet to be througly tested for desync issues. We cannot guarantee this map is fully safe yet.", "WARNING", MessageBoxButtons.OK); ObjectTimer.Start(); } else { ObjectTimer.Stop(); checkBox1.Enabled = false; } if (checkBox1.Checked) { pokeMaps(); } } } else { checkBox1.Enabled = false; if (hammerheadBridgeOrBox.Checked) { hammerheadBridgeOrBox.Checked = false; } if (hammerheadBridgeBox.Checked) { DialogResult dialogResult = MessageBox.Show("This version of Hammerhead Bridge has yet to be througly tested for desync issues. We cannot guarantee this map is fully safe yet.", "WARNING", MessageBoxButtons.OK); ObjectTimer.Start(); } else { ObjectTimer.Stop(); checkBox1.Enabled = true; } if (checkBox1.Checked) { pokeMaps(); } } }
private void hammerheadBridgeOrBox_CheckedChanged(object sender, EventArgs e) { if (hammerheadBridgeOrBox.Checked == true) { DialogResult dialogResult = MessageBox.Show("Hammerhead Bridge is known to cause serious desync issues. It is recommended to only use night mode for this map in Private Battle with each player synced up. Are you sure you want to enable night mode for this map?", "WARNING", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { if (hammerheadBridgeBox.Checked) { hammerheadBridgeBox.Checked = false; } ObjectTimer.Stop(); hammerheadBridgeOrBox.Checked = true; if (checkBox1.Checked) { buttonPoke_Click(sender, e); } } else if (dialogResult == DialogResult.No) { hammerheadBridgeOrBox.Checked = false; } } }
public void SetScrollTimer(ObjectTimer timer) { this.timer = timer; }
public TileCamera(TileMap gameMap, MovingObject montior, int width, int height, int startRow = 0, int startCol = 0) { scrollLock = ScrollLock.unlocked; this.map = gameMap; controller = this; Width = width; Height = height; minRowToStartDraw = 0; minColToStartDraw = 0; StartRow = (startRow < 0) ? 0 : startRow; StartCol = (startCol < 0) ? 0 : startCol; maxCol = (gameMap.Width - Width) / gameMap[0, 0].Width; maxCol = (maxCol < 0) ? 0 : maxCol; maxRow = (gameMap.Height - Height) / gameMap[0, 0].Height; maxRow = (maxRow < 0) ? 0 : maxRow; currentMaxCol = maxCol; currentMinCol = minColToStartDraw; currentMaxRow = maxRow; currentMinRow = minRowToStartDraw; horizontalScrollPoint = new Vector2(0, width); verticalScrollPoint = new Vector2(0, height); maxRowsToDraw = GetMaxRows(gameMap as ITileMap); maxColToDraw = GetMaxCols(gameMap as ITileMap); MonitorRectangle(montior); tk = new TimeKeeper(); timer = new ObjectTimer("mili", 400, true); _vScrolling = _hscrolling = false; }