| 47 | } |
| 48 | |
| 49 | void ActorBase::SetFacingLeft(bool value) |
| 50 | { |
| 51 | if (IsFacingLeft() == value) { |
| 52 | return; |
| 53 | } |
| 54 | |
| 55 | SetState(ActorState::IsFacingLeft, value); |
| 56 | _renderer.setFlippedX(value); |
| 57 | |
| 58 | // Recalculate hotspot |
| 59 | GraphicResource* res = (_currentTransition != nullptr ? _currentTransition : _currentAnimation); |
| 60 | if (res != nullptr) { |
| 61 | _renderer.Hotspot.X = static_cast<float>(IsFacingLeft() ? (res->Base->FrameDimensions.X - res->Base->Hotspot.X) : res->Base->Hotspot.X); |
| 62 | _renderer.setAbsAnchorPoint(_renderer.Hotspot.X, _renderer.Hotspot.Y); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | void ActorBase::SetParent(SceneNode* parent) |
| 67 | { |
no test coverage detected