static public void nowEnemyAddRoutePoint(Panel panel) { EnemyRoutePoint newRoutePoint = new EnemyRoutePoint(nowEnemy); var nowEnemyRoutePointList = enemyRoutePoints[nowEnemy]; nowEnemyRoutePointList.Add(newRoutePoint); panel.Controls.Add(newRoutePoint); }
private void routePointMouseDown(object sender, MouseEventArgs e) { isDrag = true; oldX = e.X; oldY = e.Y; if (nowRoutePoint != null) { nowRoutePoint.Image = nowRoutePoint.orgImage; } nowRoutePoint = sender as EnemyRoutePoint; nowRoutePoint.Image = nowRoutePoint.cursoredImage; }
private void routePointMouseMove(object sender, MouseEventArgs e) { try { EnemyRoutePoint enemyRoutePoint = sender as EnemyRoutePoint; if (isDrag && e.Button == MouseButtons.Left) { enemyRoutePoint.Location = new Point(enemyRoutePoint.Location.X + e.X - oldX, enemyRoutePoint.Location.Y + e.Y - oldY); //enemy.Top += e.Y - oldY; //enemy.Left += e.X - oldX; } } catch (Exception ex) { } }