shy-motherboard-37327
01/28/2023, 12:43 AMshy-motherboard-37327
01/28/2023, 12:44 AMshy-motherboard-37327
01/28/2023, 12:44 AMhaxe
class UnitIcon extends Visual {
public var base:Sprite;
public var sprite:Sprite;
public function new(unit:UnitData) {
super();
anchor(.5, .5);
base = new Sprite();
base.sheet = MainScene.iconSheet;
base.quad.roundTranslation = 1;
base.animation = "unit_base";
base.quad.color = 0x778899FF;
base.anchor(.5, .5);
sprite = new Sprite();
sprite.sheet = MainScene.unitSheet;
sprite.quad.roundTranslation = 1;
sprite.animation = "infantry_idle";
sprite.anchor(.5, .5);
add(base);
add(sprite);
}
}
shy-motherboard-37327
01/28/2023, 12:45 AMshy-motherboard-37327
01/28/2023, 12:53 AMfresh-finland-97755
01/28/2023, 4:33 AMgifted-whale-78169
01/28/2023, 5:26 AMgifted-whale-78169
01/28/2023, 5:27 AMgifted-whale-78169
01/28/2023, 5:33 AM.destroy()
it when necessaryfaint-toothbrush-51643
01/28/2023, 5:38 AMbillowy-waiter-28954
01/28/2023, 8:45 AMgifted-whale-78169
01/28/2023, 4:49 PMgifted-whale-78169
01/28/2023, 4:49 PMshy-motherboard-37327
01/28/2023, 8:56 PMfaint-toothbrush-51643
01/28/2023, 9:18 PMfaint-toothbrush-51643
01/28/2023, 9:18 PMgifted-whale-78169
01/28/2023, 10:26 PMgifted-whale-78169
01/28/2023, 10:26 PMfaint-toothbrush-51643
01/28/2023, 10:28 PMfaint-toothbrush-51643
01/28/2023, 10:28 PMfaint-toothbrush-51643
01/28/2023, 10:28 PMfaint-toothbrush-51643
01/28/2023, 10:29 PMgifted-whale-78169
01/28/2023, 10:29 PMhaxe
for (i in 0...tailLength) {
var q = new Quad();
q.texture = tailtex;
q.pos(width/2, height/2 - i * tailtex.height); //TODO1 remove spaces between pipe tails
q.anchor(0.5, 1);
tail.push(q);
}
gifted-whale-78169
01/28/2023, 10:29 PMclass Pipe extends ceramic.Visual {}
faint-toothbrush-51643
01/28/2023, 10:36 PMfaint-toothbrush-51643
01/28/2023, 10:37 PMfaint-toothbrush-51643
01/28/2023, 10:38 PMbillowy-waiter-28954
01/28/2023, 10:38 PMtexture.filter = NEAREST
gifted-whale-78169
01/28/2023, 10:39 PMfaint-toothbrush-51643
01/28/2023, 10:40 PM