コード例 #1
0
        private void SetValuesOfSelection(CellSelectionType cellSelectionType, bool value)
        {
            (int?startFrame, int?endFrame) = GetFrameBounds();
            List <M64InputCell> cells = M64Utilities.GetSelectedInputCells(
                _gui.DataGridViewInputs,
                cellSelectionType,
                startFrame,
                endFrame,
                _gui.TextBoxSelectionInputs.Text);
            int?intOnValue = ParsingUtilities.ParseIntNullable(_gui.TextBoxOnValue.Text);

            cells.ForEach(cell => cell.SetValue(value, intOnValue));
            _gui.DataGridViewInputs.Refresh();
        }
コード例 #2
0
ファイル: Combat.cs プロジェクト: eickegao/Blazera
        public void RemoveCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type)
        {
            foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition))
            {
                if (CellSet.GetCell(cellPosition) == null ||
                    CellSet.GetCell(cellPosition).GetColorEffect(type) == null)
                    continue;

                Map.RemoveObjectToDraw(DrawOrder.MapCell, GetCell(cellPosition).GetColorEffect(type));
            }
        }
コード例 #3
0
ファイル: Combat.cs プロジェクト: eickegao/Blazera
 public void ClearCellColorEffect(CellSelectionType type)
 {
     for (int y = 0; y < Map.Height; ++y)
         for (int x = 0; x < Map.Width; ++x)
             RemoveCellColorEffect(new CellArea(), new Vector2I(x, y), type);
 }
コード例 #4
0
ファイル: Combat.cs プロジェクト: eickegao/Blazera
        public void AddCellColorEffect(CellArea area, Vector2I centerCellPosition, CellSelectionType type)
        {
            foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition))
            {
                if (CellSet.GetCell(cellPosition) == null)
                    continue;

                CellShape colorEffect = GetCell(cellPosition).AddColorEffect(type);
                if (colorEffect != null)
                    Map.AddObjectToDraw(DrawOrder.MapCell, colorEffect);
            }
        }
コード例 #5
0
ファイル: CellShape.cs プロジェクト: jpx/blazera
 public CellShape(CellSelectionType type, uint size)
     : base(new Vector2f(size, size), CellSelectionTypeColor[type], false, Color.Black)
 {
 }
コード例 #6
0
ファイル: CombatCell.cs プロジェクト: eickegao/Blazera
        public CellShape AddColorEffect(CellSelectionType type)
        {
            if (!IsUsable())
                return null;

            ColorEffects[type] = new CellShape(type, CombatMap.CELL_SIZE);
            ColorEffects[type].Position = Position.ToVector2() * CombatMap.CELL_SIZE;

            return ColorEffects[type];
        }
コード例 #7
0
ファイル: CombatCell.cs プロジェクト: eickegao/Blazera
 public CellShape GetColorEffect(CellSelectionType type)
 {
     return ColorEffects[type];
 }