2017-11-09 04:01:58 +00:00
|
|
|
var Class = require('../../utils/Class');
|
|
|
|
var Components = require('./components');
|
|
|
|
var Sprite = require('../../gameobjects/sprite/Sprite');
|
|
|
|
|
|
|
|
var ArcadeSprite = new Class({
|
|
|
|
|
|
|
|
Extends: Sprite,
|
|
|
|
|
|
|
|
Mixins: [
|
|
|
|
Components.Acceleration,
|
|
|
|
Components.Angular,
|
|
|
|
Components.Bounce,
|
|
|
|
Components.Debug,
|
|
|
|
Components.Drag,
|
2017-12-03 11:06:21 +00:00
|
|
|
Components.Enable,
|
2017-11-09 04:01:58 +00:00
|
|
|
Components.Friction,
|
|
|
|
Components.Gravity,
|
|
|
|
Components.Immovable,
|
|
|
|
Components.Mass,
|
|
|
|
Components.Size,
|
|
|
|
Components.Velocity
|
|
|
|
],
|
|
|
|
|
|
|
|
initialize:
|
|
|
|
|
|
|
|
// x/y is the center of the Sprite / Body, just like other default Game Objects
|
2017-11-09 16:31:26 +00:00
|
|
|
// This needs a body adding to it, so create it via the AP Factory, or add it to an AP Group
|
|
|
|
|
|
|
|
function ArcadeSprite (scene, x, y, texture, frame)
|
2017-11-09 04:01:58 +00:00
|
|
|
{
|
|
|
|
Sprite.call(this, scene, x, y, texture, frame);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
module.exports = ArcadeSprite;
|