public override string ToString() { return(string.Format("{0} {1} {2} {3} {4} {5} {6} {7}", Radius, CenterX, CenterY, CircleColor.ToString(), BorderWidth, BorderColor.ToString(), Text, TextColor.ToString() )); }
private CircleView GetCirclePrefab(CircleColor color) { switch (color) { case CircleColor.Red: return(_redCirclePrefab); default: return(_blueCirclePrefab); } }
private void UpdateCounters(CircleColor color) { if (color == CircleColor.Red) { RedDestroyedCount++; } else { BlueDestroyedCount++; } }
public CirclePainter( float outerCircleRadiusProgress, float innerCircleRadiusProgress, CircleColor circleColor = null ) { this.outerCircleRadiusProgress = outerCircleRadiusProgress; this.innerCircleRadiusProgress = innerCircleRadiusProgress; this.circleColor = circleColor ?? new CircleColor(new Color(0xFFFF5722), new Color(0xFFFFC107)); this.circlePaint.style = PaintingStyle.fill; this.maskPaint.blendMode = BlendMode.clear; }
public static CircleUpdate CreateEmptyCircleUpdate(int index, CircleColor rightColor, CircleColor leftColor) { CircleUpdate update = new CircleUpdate(); update.RightColor = (byte)rightColor; update.LeftColor = (byte)leftColor; update.CircleIndex = (byte)index; update.NewCard = null; update.CardPowerChange = null; return(update); }
private void UpdateCounters(CircleColor color) { _spawnedCount++; if (color == CircleColor.Red) { RedSpawnedCount++; } else { BlueSpawnedCount++; } }
private Circle CreateRandomCircle(CircleColor color) { double radius = RandomRange(_settings.MinUnitRadius, _settings.MaxUnitRadius); double x = RandomRange(radius, _settings.GameAreaWidth - radius); double y = RandomRange(radius, _settings.GameAreaHeight - radius); int angle = _rand.Next(360); double speed = RandomRange(_settings.MinUnitSpeed, _settings.MaxUnitSpeed); return(CreateCircle(new CircleData() { Position = new Vector2(x, y), Velocity = new Vector2(speed * Math.Cos(angle), speed * Math.Sin(angle)), Radius = radius, Color = color })); }
public LikeButton( LikeWidgetBuilder likeBuilder = null, bool showLikeCount = false, int?likeCount = null, float size = 30, float?bubblesSize = null, float?circleSize = null, bool isLiked = false, bool isShowBubbles = true, MainAxisAlignment?mainAxisAlignment = null, TimeSpan?animationDuration = null, LikeCountAnimationType?likeCountAnimationType = null, TimeSpan?likeCountAnimationDuration = null, EdgeInsets likeButtonPadding = null, EdgeInsets likeCountPadding = null, BubblesColor bubblesColor = null, CircleColor circleColor = null, LikeButtonTapCallback onTap = null, Key key = null ) : base(key: key) { this.likeBuilder = likeBuilder; this.showLikeCount = showLikeCount; this.likeCount = likeCount; this.size = size; this.bubblesSize = bubblesSize ?? size * 2.0f; this.circleSize = circleSize ?? size * 1.2f; this.isLiked = isLiked; this.isShowBubbles = isShowBubbles; this.mainAxisAlignment = mainAxisAlignment ?? MainAxisAlignment.center; this.animationDuration = animationDuration ?? TimeSpan.FromMilliseconds(500); this.likeCountAnimationType = likeCountAnimationType ?? LikeCountAnimationType.part; this.likeCountAnimationDuration = likeCountAnimationDuration ?? TimeSpan.FromMilliseconds(500); this.likeButtonPadding = likeButtonPadding; this.likeCountPadding = likeCountPadding ?? EdgeInsets.only(4); this.bubblesColor = bubblesColor ?? new BubblesColor( new Color(0xFFFFC107), new Color(0xFFFF9800), new Color(0xFFFF5722), new Color(0xFFF44336) ); this.circleColor = circleColor ?? new CircleColor( new Color(0xFFFF5722), new Color(0xFFFFC107) ); this.onTap = onTap; }
// Start is called before the first frame update void InitstallizeColorList(int colorCount) { float unit = 360 / colorCount; //360 /4 = 90 for (int i = 0; i < colorCount; i++) { CircleColor circleColor = new CircleColor(); circleColor.minAngle = unit * i; // 90 * 0 = 0 circleColor.maxAngle = unit * (i + 1); // 90 * 1 = 90 circleColor.handle = (HandleColor)i; // i = 0 , HandleColor 0 is Pink. Debug.Log(i + 1 + " 번째 minAngle :" + circleColor.minAngle); Debug.Log(i + 1 + " 번째 maxAngle :" + circleColor.maxAngle); Debug.Log(i + 1 + " 번째 color :" + circleColor.handle); ColorList.Add(circleColor); } }
public Circle(CircleData data) { _data = data; Color = _data.Color; }