new $block(number, specificopt)
- Description:
- Creates a block from a number
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
number |
number | Block ID | ||
specific |
boolean |
<optional> |
true
|
Whether to disallow G.js from using that specific block again |
Methods
collision_block(b2, x, y) → {object}
- Description:
- Returns a collision block object
- Source:
Parameters:
Name | Type | Description |
---|---|---|
b2 |
block | Other block to check for collision |
x |
number | X coordinate of the collision block |
y |
number | Y coordinate of the collision block |
Returns:
Returned collision block
- Type
- object
if_colliding(b2, true_id, false_id)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
b2 |
block | Other block to check for collision |
true_id |
group | Group to call if colliding with b2 |
false_id |
group | Group to call if not colliding with b2 |