void AoEDamage(int pwr, int rge, int radius, RadiusType area, Vector3 location, Actor source) { foreach (Actor target in GetTargetsInArea(rge, radius, location, source.team)) { DealDamage(pwr, target); } }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ protected override bool ShouldUpdateMesh() { var ind = GetComponent <HoverIndicator>(); var shape = GetComponent <HoverShapeArc>(); vArcSteps = (int)Mathf.Max(2, shape.ArcDegrees * ArcSegmentsPerDegree); bool shouldUpdate = ( base.ShouldUpdateMesh() || ind.DidSettingsChange || shape.DidSettingsChange || ArcSegmentsPerDegree != vPrevArcSegs || InnerRadiusType != vPrevInnerType || OuterRadiusType != vPrevOuterType || AutoUvViaRadiusType != vPrevAutoUv || UvInnerRadius != vPrevUvInner || UvOuterRadius != vPrevUvOuter || UvMinArcDegree != vPrevUvMinDeg || UvMaxArcDegree != vPrevUvMaxDeg ); vPrevArcSegs = ArcSegmentsPerDegree; vPrevInnerType = InnerRadiusType; vPrevOuterType = OuterRadiusType; vPrevAutoUv = AutoUvViaRadiusType; vPrevUvInner = UvInnerRadius; vPrevUvOuter = UvOuterRadius; vPrevUvMinDeg = UvMinArcDegree; vPrevUvMaxDeg = UvMaxArcDegree; return(shouldUpdate); }
public bool Search(string str) { if (RadiusValue.ToString().Contains(str) || RadiusType.ToString().Contains(str) || TargetID.ToString().Contains(str) || Target_Type.ToString().Contains(str)) { return(true); } else { return(false); } }
public static void RoundViewWithBorder(this UIView view, CGColor borderColor, float borderWidth, float?radiusAspect = null, RadiusType typeRadius = RadiusType.Static) { if (typeRadius == RadiusType.Static) { view.SetRoundView(radiusAspect ?? 0.5f); } else { view.RoundView(radiusAspect); } view.Layer.BorderColor = borderColor; view.Layer.BorderWidth = borderWidth; }
/*--------------------------------------------------------------------------------------------*/ protected float GetRadiusProgress(RadiusType pType) { HoverIndicator ind = GetComponent <HoverIndicator>(); switch (pType) { case RadiusType.Min: return(0); case RadiusType.Selection: return(ind.SelectionProgress); case RadiusType.Highlight: return(ind.HighlightProgress); case RadiusType.Max: return(1); } throw new Exception("Unexpected type: " + pType); }
/*--------------------------------------------------------------------------------------------*/ protected float GetRadiusProgress(RadiusType pType) { HoverIndicator ind = GetComponent<HoverIndicator>(); switch ( pType ) { case RadiusType.Min: return 0; case RadiusType.Selection: return ind.SelectionProgress; case RadiusType.Highlight: return ind.HighlightProgress; case RadiusType.Max: return 1; } throw new Exception("Unexpected type: "+pType); }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ protected override bool ShouldUpdateMesh() { var ind = GetComponent<HoverIndicator>(); var shape = GetComponent<HoverShapeArc>(); vArcSteps = (int)Mathf.Max(2, shape.ArcDegrees*ArcSegmentsPerDegree); bool shouldUpdate = ( base.ShouldUpdateMesh() || ind.DidSettingsChange || shape.DidSettingsChange || ArcSegmentsPerDegree != vPrevArcSegs || InnerRadiusType != vPrevInnerType || OuterRadiusType != vPrevOuterType || AutoUvViaRadiusType != vPrevAutoUv || UvInnerRadius != vPrevUvInner || UvOuterRadius != vPrevUvOuter || UvMinArcDegree != vPrevUvMinDeg || UvMaxArcDegree != vPrevUvMaxDeg ); vPrevArcSegs = ArcSegmentsPerDegree; vPrevInnerType = InnerRadiusType; vPrevOuterType = OuterRadiusType; vPrevAutoUv = AutoUvViaRadiusType; vPrevUvInner = UvInnerRadius; vPrevUvOuter = UvOuterRadius; vPrevUvMinDeg = UvMinArcDegree; vPrevUvMaxDeg = UvMaxArcDegree; return shouldUpdate; }
public DialRadiusStyle(double r, RadiusType style = RadiusType.Inner) { this.R = r; this.Style = style; }
/// <summary> /// /// <summary> /// Initializes a new instance of the <see cref="TwitterGeoLocation"/> struct. /// </summary> /// </summary> /// <param name="latitutde">The latitude of search location.</param> /// <param name="longitude">The longitude of search location.</param> /// <param name="radius">The radius of search location.</param> /// <param name="unitOfMeasurement">The unit of measurement (Mi or Km).</param> public TwitterGeoLocationSearch(double latitutde, double longitude, int radius, RadiusType unitOfMeasurement) : base(latitutde, longitude) { Radius = radius; UnitOfMeasurement = unitOfMeasurement; }
public void SetBackgroundColor(string color, float?radiusAspect = null, string borderColor = null, float?borderWidth = null, RadiusType type = RadiusType.Static, string selectedColorView = "") { if (WrappedObject == null) { ExceptionLogger.RaiseNonFatalException( new ExceptionWithCustomStack( WrappedObjectIsNull, Environment.StackTrace)); return; } if (string.IsNullOrEmpty(color)) { ExceptionLogger.RaiseNonFatalException( new ExceptionWithCustomStack( EmptyColorError, Environment.StackTrace)); color = TransparentColor; } if (selectedColorView.IsNullOrWhiteSpace()) { ColorOriginalView = color; ColorOriginalV2View = ColorOriginalView; } else { ColorOriginalV2View = selectedColorView; } BorderColor = borderColor; BorderWidth = borderWidth; RadiusValueType = type; RadiusAspect = radiusAspect; if (RadiusAspect != null && WrappedObject is ImageView) { WrappedObject = (FFImageLoading.Views.ImageViewAsync)WrappedObject; if (radiusAspect == null) { return; } var b = new FFImageLoading.Transformations.CornersTransformation((double)radiusAspect, FFImageLoading.Transformations.CornerTransformType.AllRounded, 0, 0); if (!Url.IsNullOrWhiteSpace()) { var a = FFImageLoading.ImageService.Instance .LoadUrl(Url) .Transform(new List <FFImageLoading.Work.ITransformation>() { b }); FFImageLoading.TaskParameterPlatformExtensions.Into(a, WrappedObject as FFImageLoading.Views.ImageViewAsync); } else if (DrawableId > 0) { var a = FFImageLoading.ImageService.Instance .LoadCompiledResource(DrawableId.ToString()) .Transform(b); FFImageLoading.TaskParameterPlatformExtensions.Into(a, WrappedObject as FFImageLoading.Views.ImageViewAsync); } } else if (RadiusAspect != null && borderWidth != null) { if (string.IsNullOrEmpty(color)) { ExceptionLogger.RaiseNonFatalException( new ExceptionWithCustomStack( EmptyBorderColorError, Environment.StackTrace)); borderColor = TransparentColor; } switch (type) { case RadiusType.Aspect: InvokeWithMeasuredHeight(height => SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), height * RadiusAspect.Value, borderColor.ToColor(), borderWidth.Value)); break; case RadiusType.Static: SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), RadiusAspect.Value.Iphone6PointsToDevicePixels(), borderColor.ToColor(), borderWidth.Value); break; } } else if (RadiusAspect != null) { switch (type) { case RadiusType.Aspect: InvokeWithMeasuredHeight(height => SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), height * RadiusAspect.Value)); break; case RadiusType.Static: SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), RadiusAspect.Value.Iphone6PointsToDevicePixels()); break; } } else { switch (type) { case RadiusType.Aspect: if (!borderColor.IsNull()) { InvokeWithMeasuredHeight(height => { if (borderWidth != null) { SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), height * 0.5f, borderColor?.ToColor(), borderWidth.Value); } }); } else { InvokeWithMeasuredHeight(height => SetRoundView(WrappedObject, ColorOriginalV2View.ToColor(), height * 0.5f)); } break; default: AppTools.CurrentActivity?.RunOnUiThread(() => { WrappedObject.SetBackgroundColor(ColorOriginalV2View.ToColor()); }); break; } } }