Esempio n. 1
0
        void HitCheck(MoveObject move1G, MoveObject move2G)
        {
            var temp1 = move1G;
            var temp2 = move2G;

            while (temp1 != null)
            {
                while (temp2 != null)
                {
                    if (
                        (
                            (temp1.Point.X >= temp2.Point.X && temp1.Point.X <= temp2.Point.X + 30) ||
                            (temp2.Point.X >= temp1.Point.X && temp2.Point.X <= temp1.Point.X + 30)
                        ) &&
                        (
                            (temp1.Point.Y >= temp2.Point.Y && temp1.Point.Y <= temp2.Point.Y + 30) ||
                            (temp2.Point.Y >= temp1.Point.Y && temp2.Point.Y <= temp1.Point.Y + 30)
                        )
                        )
                    {
                        //あたった
                        temp1.Remove();
                        temp2.Remove();
                        temp1.DrawTool.RemoveLabel(temp1.Name);
                        temp2.DrawTool.RemoveLabel(temp2.Name);
                    }


                    temp2 = (MoveObject)temp2.NextTask;
                }
                temp1 = (MoveObject)temp1.NextTask;
                temp2 = move2G;
            }
        }
Esempio n. 2
0
        public void Clear()
        {
            MoveObject temp = (MoveObject)MoveObjectGroup.NextTask;

            while (temp != null)
            {
                temp.Remove();
                temp.DrawTool.RemoveLabel(temp.Name);
                temp = (MoveObject)temp.NextTask;
            }
        }
Esempio n. 3
0
        /*
         * public Bellet2(DrawTool drawTool, Vector2 point) : base(drawTool)
         * {
         *  damege = 5;
         *  Picture = "・";
         *  Point = point;
         *  Vector = new Vector2(0, -6);
         *  Count = 0;
         *  LimitCount = 600;
         *
         *  Name = drawTool.AddLabel(Picture);
         * }
         *
         * public Bellet2(DrawTool drawTool, Vector2 point, bool teki) : base(drawTool)
         * {
         *  damege = 5;
         *  Picture = "・";
         *  Point = point;
         *  Vector = new Vector2(0, 6);
         *  Count = 0;
         *  LimitCount = 600;
         *
         *  Name = drawTool.AddLabel(Picture);
         * }*/


        public Bellet2(DrawTool drawTool, Vector2 point, MoveObject moveObject) : base(drawTool)
        {
            damege     = 5;
            Picture    = "◎";
            Point      = point;
            Vector     = new Vector2(0, 0);
            Count      = 0;
            LimitCount = 600;

            Name = drawTool.AddLabel(Picture);

            target    = moveObject;
            MaxDegree = (float)(((Math.PI * 10) / 180));//約10度がマックス
        }
Esempio n. 4
0
 public teki(DrawTool drawTool, string pic, Vector2 point, Vector2 vec, MoveObject target, ManageMoveObject bulletGroup) : base(drawTool, pic, point, vec, bulletGroup)
 {
     IntervalShot = 150;
     this.target  = target;
 }
Esempio n. 5
0
 public void Add(MoveObject AddMoveObject)
 {
     MoveObjectGroup.Add(AddMoveObject);
 }
Esempio n. 6
0
 public ManageMoveObject(DrawTool drawTool) : base(drawTool)
 {
     MoveObjectGroup = new Character(DrawTool);
 }