예제 #1
0
 void Awake()
 {
     sprite        = transform.FindChild("sprite").gameObject;
     explosion     = transform.FindChild("explosion").gameObject;
     bomb_collider = GetComponent <CircleCollider2D>();
     circle_drawer = GetComponent <CircleDraw>();
 }
예제 #2
0
        protected override void SetTrack(PointF ModelOrigin, Color backColor)
        {
            PointF canvasOrgion = DrawingUtils.Instance.CoordinateTrans(ModelOrigin);

            this.circle = new CircleDraw(new PointF(canvasOrgion.X + centerPosition.X, canvasOrgion.Y + centerPosition.Y),
                                         radius, Properties.Settings.Default.TrackWidth, backColor);

            this.centerPosition = new PointF(canvasOrgion.X + centerPosition.X, canvasOrgion.Y + centerPosition.Y);
        }
예제 #3
0
        protected override void SetTrack(PointF ModelOrigin, Color backColor)
        {
            PointF canvasOrigin = DrawingUtils.Instance.CoordinateTrans(ModelOrigin);

            PointF position = new PointF(this.position.X + canvasOrigin.X, this.position.Y + canvasOrigin.Y);

            this.circle = new CircleDraw(new PointF(position.X, position.Y), Properties.Settings.Default.TrackWidth, Properties.Settings.Default.TrackWidth * 0.25f, backColor);
            this.upLine = new LineDraw(new PointF(position.X, position.Y + Properties.Settings.Default.TrackWidth * 0.5f),
                                       new PointF(position.X, position.Y + Properties.Settings.Default.TrackWidth * (float)1.2), Properties.Settings.Default.TrackWidth * 0.12f, backColor, false, true);
            this.downLine = new LineDraw(new PointF(position.X, position.Y - Properties.Settings.Default.TrackWidth * 0.5f),
                                         new PointF(position.X, position.Y - Properties.Settings.Default.TrackWidth * (float)1.2), Properties.Settings.Default.TrackWidth * 0.12f, backColor, false, true);
            this.leftLine = new LineDraw(new PointF(position.X - Properties.Settings.Default.TrackWidth * 0.5f, position.Y),
                                         new PointF(position.X - Properties.Settings.Default.TrackWidth * (float)1.2, position.Y), Properties.Settings.Default.TrackWidth * 0.12f, backColor, false, true);
            this.rightLine = new LineDraw(new PointF(position.X + Properties.Settings.Default.TrackWidth * 0.5f, position.Y),
                                          new PointF(position.X + Properties.Settings.Default.TrackWidth * (float)1.2, position.Y), Properties.Settings.Default.TrackWidth * 0.12f, backColor, false, true);
        }
예제 #4
0
        public bool IsContain(RectangleF mouseRect, DirectiveDraw entity)
        {
            CircleDraw circle = entity as CircleDraw;

            return(Geometry.RectContainCircle(mouseRect, circle.centerPosition, circle.radius));
        }
예제 #5
0
        public bool IsHitting(PointF mouseLocationInModel, DirectiveDraw entity)
        {
            CircleDraw circle = entity as CircleDraw;

            return(Geometry.PointInCircle(mouseLocationInModel, circle.centerPosition, circle.radius, circle.lineWidth));
        }
예제 #6
0
파일: Shell.cs 프로젝트: SavvyEdu/Atom
 private void Awake()
 {
     particles  = new List <Particle>();
     circleDraw = GetComponent <CircleDraw>();
 }
예제 #7
0
    public void ShowPlayerRange(float range, Vector3 pos)
    {
        circle = gameObject.AddComponent<CircleDraw>();

        circle.MakeCircle(range, pos);
    }
예제 #8
0
 private void Awake()
 {
     _circleDraw = GetComponent <CircleDraw>();
     hauseTarget = GetComponent <Base>() != null;
 }