Ramu 0.7b doc
class
SimpleRectCollisor: Collisor
Description
Rectangle collisor.
Constructor Parameters
int
x: Position in x.int
y: Position in y.int
width: Width.int
height: Height.let rec = new SimpleRectCollisor(10, 10, 100, 100);
You can test this snippet of code here. ```javascript Ramu.init(); Ramu.debugMode = true;
let rec1 = new SimpleRectCollisor(10, 15, 100, 100); let rec2 = new SimpleRectCollisor(15, 10, 50, 50);
new GameObj().update = function(){ if (keyCode.space in Ramu.lastKeysPressed){ rec1 .canCollide = !rec1.canCollide; } }; ```
Inherited Members
- canCollide
- canDestroy
- canDraw
- canUpdate
- collision
- collisionPriority
- destroy
- draw
- drawOutOfCanvas
- drawPriority
- flipHorizontally
- flipVertically
- height
- isInCollision
- onCollision
- opacity
- setActive
- start
- tag
- toRect
- update
- updatePriority
- width
- x
- y