Ejemplo n.º 1
0
 /// <summary>
 /// 円形設定
 /// </summary>
 /// <param name="range">半径</param>
 public void SetCircle(float range)
 {
     this.form   = COL_FORM.CIRCLE;
     this.size.x = this.size.y = 0f;
     this.range  = range;
     this.angle  = 0f;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 矩形設定
 /// </summary>
 /// <param name="size">サイズ</param>
 /// <param name="angle">回転角</param>
 public void SetRectangle(Vector2 size, float angle = 0f)
 {
     this.form  = COL_FORM.RECTANGLE;
     this.size  = size;
     this.range = size.magnitude * 0.5f;
     this.angle = angle;
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 矩形設定
 /// </summary>
 /// <param name="x">横幅</param>
 /// <param name="y">縦幅</param>
 /// <param name="angle">回転角</param>
 public void SetRectangle(float x, float y, float angle = 0f)
 {
     this.form  = COL_FORM.RECTANGLE;
     this.size  = new Vector2(x, y);
     this.range = size.magnitude * 0.5f;
     this.angle = angle;
 }