コード例 #1
0
        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();
        }
コード例 #2
0
 void Update()
 {
     if (!_active)
     {
         return;
     }
     if (_spriteAnimator.CheckFrameUpdate())
     {
         UpdateSpriteFrame();
     }
 }
コード例 #3
0
        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();
        }