77 lines
2.3 KiB
JavaScript
77 lines
2.3 KiB
JavaScript
(function (PIXI, lib) {
|
|
|
|
var MovieClip = PIXI.animate.MovieClip;
|
|
var Container = PIXI.Container;
|
|
var Sprite = PIXI.Sprite;
|
|
var fromFrame = PIXI.Texture.fromFrame;
|
|
|
|
lib.icon = Container.extend(function () {
|
|
Container.call(this);
|
|
|
|
});
|
|
|
|
lib.border = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("SkillButtonBorder1"))
|
|
.setTransform(-164.95, -149.95);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.gradient = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("SkillButtonGradient1"))
|
|
.setTransform(-164.95, -149.95);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.background = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance1 = new Sprite(fromFrame("SkillButtonBackground1"))
|
|
.setTransform(-164.95, -149.95);
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.content = Container.extend(function () {
|
|
Container.call(this);
|
|
var instance4 = new lib.background()
|
|
.setTransform(0, -15);
|
|
this[instance4.name = "background"] = instance4;
|
|
var instance3 = new lib.gradient()
|
|
.setTransform(0, -15);
|
|
this[instance3.name = "gradient"] = instance3;
|
|
var instance2 = new lib.border()
|
|
.setTransform(0, -15);
|
|
this[instance2.name = "border"] = instance2;
|
|
var instance1 = new lib.icon()
|
|
.setTransform(0, -16);
|
|
this[instance1.name = "icon"] = instance1;
|
|
this.addChild(instance4, instance3, instance2, instance1);
|
|
});
|
|
|
|
lib.skillButton = MovieClip.extend(function () {
|
|
MovieClip.call(this, {
|
|
duration: 1,
|
|
framerate: 30
|
|
});
|
|
var instance1 = new lib.content()
|
|
.setTransform(165, 165);
|
|
this[instance1.name = "content"] = instance1;
|
|
this.addChild(instance1);
|
|
});
|
|
|
|
lib.skillButton.assets = {
|
|
"skillButton_atlas_1": "images/skillButton_atlas_1.json"
|
|
};
|
|
})(PIXI, lib = lib || {});
|
|
var lib;
|
|
if (typeof module !== 'undefined' && module.exports) {
|
|
module.exports = {
|
|
stage: lib.skillButton,
|
|
background: 0x0,
|
|
width: 330,
|
|
height: 300,
|
|
framerate: 30,
|
|
totalFrames: 1,
|
|
library: lib
|
|
};
|
|
} |