public void OnSystemUpdate(float dt) { if (!_active) { return; } _billboard.Apply(_renderer.transform, _backwards, ref _lastAngleHeight); var orientation = SpriteFacingControl.GetCameraSide(_facing, transform, transform.parent, 5, out var inMargin); if (_orientation == orientation || (inMargin && (orientation.IsAdjacent(_orientation)))) { if (_spriteAnimator.CheckFrameUpdate()) { UpdateSpriteFrame(); } return; } _orientation = orientation; UpdateSpriteFrame(); }
void Update() { if (!_active) { return; } if (_spriteAnimator.CheckFrameUpdate()) { UpdateSpriteFrame(); } }
void Update() { if (!_active) { return; } if (_spriteAnimator.CheckFrameUpdate()) { UpdateSpriteFrame(); } _billboard.Apply(transform, _backwards); bool inMargin; var orientation = SpriteFacingControl.GetCameraSide(_facing, transform, transform.parent, 5, out inMargin); if (_orientation == orientation || (inMargin && (orientation.IsAdjacent(_orientation)))) { return; } _orientation = orientation; UpdateSpriteFrame(); }