Esempio n. 1
0
    public void DisplayRange(ProjectionManager pm, Cell currentCell, Rotation currentRotation)
    {
        pm.ClearProjections();
        if (Rotation.Length == 0)
        {
            pm.SelectCells(RangeType, currentCell,
                           MinRange,
                           MaxRange,
                           NeedLineOfSight,
                           TargetMustBeEmpty,
                           NeedPathToTarget,
                           true,
                           false,
                           SelectionState.DisplaySkillRange);
        }
        else
        {
            foreach (RelativeRotation relativeRotation in Rotation)
            {
                pm.SelectCells(RangeType, currentCell,
                               MinRange,
                               MaxRange,
                               NeedLineOfSight,
                               TargetMustBeEmpty,
                               NeedPathToTarget,
                               true,
                               false,
                               SelectionState.DisplaySkillRange,
                               relativeRotation,
                               currentRotation);
            }
        }
        pm.ColorProjections(pm.Selection, Color.cyan);
        pm.EnableProjections(pm.Selection, true);

        if (NeedLineOfSight)
        {
            pm.ColorProjections(pm.NotInLOS, Color.grey);
            pm.EnableProjections(pm.NotInLOS, true);
        }
    }
Esempio n. 2
0
 public void DisplayAreaOfEffect(ProjectionManager pm, Cell targetCell, Rotation currentRotation)
 {
     pm.ClearProjections();
     foreach (SkillEffect effect in SkillEffects)
     {
         foreach (AreaOfEffect aoe in AreaOfEffect)
         {
             if (aoe.Rotation.Count == 0)
             {
                 pm.SelectCells(aoe.Type, targetCell,
                                aoe.MinSize,
                                aoe.MaxSize,
                                aoe.NeedLineOfSight,
                                TargetMustBeEmpty,
                                aoe.NeedPathToTarget,
                                true,
                                true,
                                SelectionState.DisplaySkillAoe);
             }
             else
             {
                 foreach (RelativeRotation relativeRotation in aoe.Rotation)
                 {
                     pm.SelectCells(aoe.Type, targetCell,
                                    aoe.MinSize,
                                    aoe.MaxSize,
                                    aoe.NeedLineOfSight,
                                    TargetMustBeEmpty,
                                    aoe.NeedPathToTarget,
                                    true,
                                    true,
                                    SelectionState.DisplaySkillAoe,
                                    relativeRotation,
                                    currentRotation);
                 }
             }
         }
     }
 }