// -----------------------------------------------------------------------
// TINAMI Comike Map System Ver 2006.10.16
// (c) 2006 TINAMI. All rights reserved.
// rect.js: 四角クラス。ヒットチェックで使用
// -----------------------------------------------------------------------
var Rectangle = Class.create();
Rectangle.prototype = {
  initialize: function (left, top, width, height)
  {
    this.top = top;
    this.left = left;
    this.width = width;
    this.height = height;
  },

  // ボタンはクリックされているか？
  isClick: function (clientX, clientY)
  {
    if (clientX >= this.left && clientX <= (this.left + this.width) &&
        clientY >= this.top  && clientY <= (this.top  + this.height)) {
      return true;
    } else {
      return false;
    }
  }
};

