mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added items to map
This commit is contained in:
parent
a0f3ae01d8
commit
6c78c750f0
5 changed files with 67 additions and 32 deletions
|
|
@ -7,7 +7,20 @@ define([
|
|||
function (Parent, Box2D, Settings) {
|
||||
|
||||
function Item(physicsEngine, uid, options) {
|
||||
this.options = options;
|
||||
this.options = {
|
||||
category: options.category,
|
||||
image: options.image,
|
||||
name: options.name,
|
||||
type: options.type,
|
||||
grabAngle: parseFloat(options.grabAngle),
|
||||
weight: parseFloat(options.weight),
|
||||
width: parseFloat(options.width),
|
||||
height: parseFloat(options.height),
|
||||
rotation: parseFloat(options.rotation),
|
||||
bounce: parseFloat(options.bounce),
|
||||
x: parseFloat(options.x),
|
||||
y: parseFloat(options.y)
|
||||
};
|
||||
Parent.call(this, physicsEngine, uid);
|
||||
this.createFixture();
|
||||
this.body.ResetMassData();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue