Class enchant.PhyBoxSprite
- Defined in: box2d.enchant.js
- Extends enchant.box2d.PhySprite
Constructor Attributes | Constructor Name and Description |
---|---|
enchant.PhyBoxSprite(width, height, staticOrDynamic, density, friction, restitution, isSleeping)
四角形の物理シミュレーション用Sprite
|
- Fields borrowed from class enchant.box2d.PhySprite:
- angle, angularVelocity, centerX, centerY, position, sleep, type, velocity, vx, vy, x, y
- Fields borrowed from class enchant.Sprite:
- frame, image
- Fields borrowed from class enchant.Entity:
- backgroundColor, buttonMode, buttonPressed, compositeOperation, debugColor, height, opacity, originX, originY, rotation, scaleX, scaleY, touchEnabled, visible, width
- Fields borrowed from class enchant.Node:
- age, parentNode, scene
Method Summary
- Methods borrowed from class enchant.box2d.PhySprite:
- applyForce
- applyImpulse
- applyTorque
- contact
- createPhyBox
- createPhyCircle
- destroy
- setAwake
- Methods borrowed from class enchant.Entity:
- disableCollection
- enableCollection
- intersect
- rotate
- scale
- within
- Methods borrowed from class enchant.Node:
- moveBy
- moveTo
- Methods borrowed from class enchant.EventTarget:
- addEventListener
- clearEventListener
- dispatchEvent
- on
- removeEventListener
Class Detail
enchant.PhyBoxSprite(width, height, staticOrDynamic, density, friction, restitution, isSleeping)
四角形の物理シミュレーション用Sprite
var bear = new PhyBoxSprite(32, 32, enchant.box2d.DYNAMIC_SPRITE, 1.0, 0.5, 0.3, true); bear.image = core.assets['chara1.gif'];
- Parameters:
- {Number} width Optional
- Spriteの横幅.
- {Number} height Optional
- Spriteの高さ.
- {Boolean} staticOrDynamic Optional
- 静止するか動くか.
- {Number} density Optional
- Spriteの密度.
- {Number} friction Optional
- Spriteの摩擦.
- {Number} restitution Optional
- Spriteの反発.
- {Boolean} isSleeping Optional
- Spriteが初めから物理演算を行うか.