MattRix / Futile

A super simple Unity 2D framework
http://struct.ca/futile
833 stars 130 forks source link

Add SetMatrix as well as skewX and skewY #224

Open MattRix opened 10 years ago

MattRix commented 10 years ago

https://github.com/MattRix/Futile/pull/223

This will allow you full control of a matrix if needed. Also note the _didSetMatrix flag, which could maybe be inverted and renamed to something like "_shouldCalculateMatrix".

SimianLogic commented 10 years ago

makes sense. also realized I never actually use _skewX/Y as I go straight to the matrix.

could also foresee problems with rotation returning a bogus value (maybe have it check _shouldCalculateMatrix and either return _rotation or _matrix.GetRotation()).

in practice it shouldn't make much difference -- I feel like you're either going to be in data-driven setMatrix land (where you don't care about _rotation) or code-set Pos/Scale/Rot land (where you don't care about _skewX/Y)