Class Summary
Constructor Attributes
Constructor Name and Description
Entityオブジェクトを作成する.
Field Summary
Field Attributes
Field Name and Description
backgroundColor
Entityの背景色.
buttonMode
Entityにボタンの機能を設定する.
buttonPressed
Entityが押されているかどうか.
height
Entityの高さ.
opacity
Entityの透明度.
touchEnabled
Entityのタッチを有効にするかどうかを指定する.
visible
Entityを表示するかどうかを指定する.
width
Entityの横幅.
Fields borrowed from class enchant.Node: parentNode, scene, x, y
Method Summary
Method Attributes
Method Name and Description
intersect(other)
Entityの矩形が交差しているかどうかにより衝突判定を行う.
within(other, distance)
Entityの中心点どうしの距離により衝突判定を行う.
Methods borrowed from class enchant.Node: moveBy moveToMethods borrowed from class enchant.EventTarget: addEventListener dispatchEvent removeEventListner
Class Detail
enchant.Entity()
Entityオブジェクトを作成する.
Field Detail
backgroundColor
Entityの背景色. CSSの'color'プロパティと同様の形式で指定できる.
buttonMode
Entityにボタンの機能を設定する.
buttonPressed
Entityが押されているかどうか. buttonModeがtrueのときだけ機能する.
height
Entityの高さ.
opacity
Entityの透明度. 0から1までの値を設定する(0が完全な透明、1が完全な不透明).
touchEnabled
Entityのタッチを有効にするかどうかを指定する.
visible
Entityを表示するかどうかを指定する.
width
Entityの横幅.
Method Detail
{Boolean}intersect(other)
Entityの矩形が交差しているかどうかにより衝突判定を行う.
Parameters:{*} other衝突判定を行うEntityなどx, y, width, heightプロパティを持ったObject.Returns:{Boolean} 衝突判定の結果.
{Boolean}within(other, distance)
Entityの中心点どうしの距離により衝突判定を行う.
Parameters:{*} other衝突判定を行うEntityなどx, y, width, heightプロパティを持ったObject.{Number} distanceOptional衝突したと見なす最大の距離. デフォルト値は二つのEntityの横幅と高さの平均.Returns:{Boolean} 衝突判定の結果.
最終更新:2011年04月26日 22:58