Esempio n. 1
0
File: Spell.cs Progetto: jpx/blazera
        public Spell(Spell copy)
            : base(copy)
        {
            Effect = new AnimationMapEffect(copy.Effect);

            RangeArea = new CellArea(copy.RangeArea);
            EffectArea = new CellArea(copy.EffectArea);
        }
Esempio n. 2
0
File: Spell.cs Progetto: jpx/blazera
        public void InitEffect(
            string animationType, string soundName,
            CellAreaType rangeAreaType, int rangeAreaMinRange, int rangeAreaMaxRange,
            CellAreaType effectAreaType, int effectAreaMinRange, int effectAreaMaxRange)
        {
            Effect.Init(animationType, soundName);

            RangeArea = new CellArea(rangeAreaType, rangeAreaMinRange, rangeAreaMaxRange);
            EffectArea = new CellArea(effectAreaType, effectAreaMinRange, effectAreaMaxRange);
        }
Esempio n. 3
0
        public CellArea(CellArea copy)
        {
            Type = copy.Type;

            MinRange = copy.MinRange;
            MaxRange = copy.MaxRange;

            CenterCellPosition = new Vector2I(copy.CenterCellPosition);

            CellPositions = new List<Vector2I>();

            Build();
        }
Esempio n. 4
0
        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));
            }
        }
Esempio n. 5
0
        public List<CombatCell> GetCellFromArea(CellArea area, Vector2I centerCellPosition)
        {
            List<CombatCell> cells = new List<CombatCell>();

            foreach (Vector2I cellPosition in area.GetAreaCellPositions(centerCellPosition))
                if (GetCell(cellPosition) != null)
                    cells.Add(GetCell(cellPosition));

            return cells;
        }
Esempio n. 6
0
        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);
            }
        }
Esempio n. 7
0
 public static bool IsWithinArea(CombatCell cell, CellArea area, Vector2I centerCellPosition)
 {
     return area.ContainsCell(centerCellPosition, cell);
 }
Esempio n. 8
0
 public bool IsWithinArea(CellArea area, Vector2I centerCellPosition)
 {
     return IsWithinArea(this, area, centerCellPosition);
 }