public Spell(Spell copy) : base(copy) { Effect = new AnimationMapEffect(copy.Effect); RangeArea = new CellArea(copy.RangeArea); EffectArea = new CellArea(copy.EffectArea); }
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); }
public CellArea(CellArea copy) { Type = copy.Type; MinRange = copy.MinRange; MaxRange = copy.MaxRange; CenterCellPosition = new Vector2I(copy.CenterCellPosition); CellPositions = new List<Vector2I>(); Build(); }
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)); } }
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; }
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); } }
public static bool IsWithinArea(CombatCell cell, CellArea area, Vector2I centerCellPosition) { return area.ContainsCell(centerCellPosition, cell); }
public bool IsWithinArea(CellArea area, Vector2I centerCellPosition) { return IsWithinArea(this, area, centerCellPosition); }