I was checking a Rugby Game we did a while ago and it doesn’t work because of a script which manages tweens.
tween.js
These last lines of the script are causing problems:
// Add pc.Entity#tween method
pc.Entity.prototype.tween = function (target, options) {
var tween = this._app.tween(target);
tween.entity = this;
this.once('destroy', tween.stop, tween);
if (options && options.element) {
// specifiy a element property to be updated
tween.element = options.element;
}
return tween;
};
// Create a default tween manager on the application
var application = pc.Application.getApplication();
if (application) {
application.addTweenManager();
}
Please advice