azerion / phaser-spine

A plugin for Phaser 2 that adds Spine support
MIT License
121 stars 58 forks source link

[Spine-TS] Cannot control alpha #73

Closed shibekin69 closed 7 years ago

shibekin69 commented 7 years ago

I can't control the alpha from either the parent group of the spine object, or the spine object itself. It seems to be ignored.

So these don't work:

spineObj.alpha = 0.6 spineGroup.alpha = 0.6 spineGroup.children[0] = 0.6 //Where spine object is child of spineGroup

If I set:

spineGroup.alpha = 0;

It works by hiding the spine object, but there's no in-between, it's just either visible or not visible. I use tweens to hide and show my spine objects (and the hiding part does free up resources at least). Not sure why this is a problem here...

shibekin69 commented 7 years ago

Just an observation: If I try adjusting game.world.alpha, it manages to affect the alpha of spine object (on top of everything else.)

AleBles commented 7 years ago

Should work now, please try it out =)

shibekin69 commented 7 years ago

@AleBles

Ok! Tried it out. I've a group that's holding the spine object. Here are the different commands I've tried out:

aGroup.alpha = 0.5 [DOESN'T WORK, ONLY AFFECTS OTHER NON SPINE OBJECTS] aGroup.children[0].alpha = 0.5 [WORKS]

AleBles commented 7 years ago

How about now?

shibekin69 commented 7 years ago

I'll give this and the rotation a try later. Will let you know.

shibekin69 commented 7 years ago

This seems to work.