1 decade ago by Asim
hi,
an entity of mine can exist in two orientations: upright and upside-down.. for this, im using a flag
however there are two issues with this approach:
1. there is a jitter evey time i switch animations in the
2. the weltmeister shows the entity always shows the entity in its upright position until the level is reloaded..
ideally, i'd like:
1. not to define multiple entities and animation sheets (one for upright, another for upside-down)..
2. if i specify
is there a way to accomplish this?
an entity of mine can exist in two orientations: upright and upside-down.. for this, im using a flag
isFlipped.. the flag can be set via weltmeister which will determine the entity's orientation through-out its lifespan.. the update method looks like:
update: function() {
this.parent();
this.currentAnim.flip.y = this.isFlipped;
}
however there are two issues with this approach:
1. there is a jitter evey time i switch animations in the
check() function (the animation appears upright for a fraction of a second before being flipped..2. the weltmeister shows the entity always shows the entity in its upright position until the level is reloaded..
ideally, i'd like:
1. not to define multiple entities and animation sheets (one for upright, another for upside-down)..
2. if i specify
isFlipped value in weltmeister, the entity image should update to reflect the inverted/upright state..is there a way to accomplish this?
