Ejemplo n.º 1
0
 public void RemoveObstacle(BTBLib.Obstacle value)
 {
     if (_obstaclesToDraw.Contains(value))
     {
         _obstaclesToDraw.Remove(value);
     }
 }
Ejemplo n.º 2
0
 public void AddObstacle(BTBLib.Obstacle value)
 {
     if (!_obstaclesToDraw.Contains(value))
     {
         _obstaclesToDraw.Add(value);
     }
 }
Ejemplo n.º 3
0
        private void UpdateTreeViewObstacles()
        {
            TreeNode obstaclesNode = GetObstaclesNode();

            foreach (TreeNode node in obstaclesNode.Nodes)
            {
                TagData         tagData  = node.Tag as TagData;
                BTBLib.Obstacle obstacle = tagData.GetObstacleLink();
                node.Checked = _drawData.ContainsObstacle(obstacle);
            }
        }
Ejemplo n.º 4
0
 public void SetObstacle(bool show, BTBLib.Obstacle value)
 {
     if (show)
     {
         AddObstacle(value);
     }
     else
     {
         RemoveObstacle(value);
     }
 }
Ejemplo n.º 5
0
        private void DrawObstacle(Graphics graphics, Color color, bool fill, BTBLib.Obstacle obstacle)
        {
            Pen pen = new Pen(color, 2.0f / _zoom);

            float radius = obstacle.Radius;            // * 2;
            float size   = radius * 2;

            int div = 8;

            graphics.DrawEllipse(pen, (obstacle.X - radius) / div, (_battle.Height - obstacle.Y - radius) / div, size / div, size / div);
            //graphics.DrawRectangle(pen, (obstacle.X - radius) / 8, (_battle.Height - obstacle.Y - radius) / 8, size, size);

            graphics.FillRectangle(new SolidBrush(color), (obstacle.X) / 8f - 0.5f, (_battle.Height - obstacle.Y) / 8f - 0.5f, 1f, 1f);
        }
Ejemplo n.º 6
0
 public bool ContainsObstacle(BTBLib.Obstacle value)
 {
     return(_obstaclesToDraw.Contains(value));
 }