コード例 #1
0
ファイル: EnemyController.cs プロジェクト: joro550/Pollinator
 private void SetCurrentSightLineAnimation(SightLine currentSightLine, bool isEnabled)
 {
     if (!string.IsNullOrEmpty(currentSightLine.AnimationFlag()))
     {
         _animator.SetBool(currentSightLine.AnimationFlag(), isEnabled);
     }
 }
コード例 #2
0
        private Controllers.SightLine GetNextSightLine()
        {
            switch (_currentSightLine)
            {
            case SightLine.BottomRight:
            {
                _currentSightLine = SightLine.BottomLeft;
                return(bottomLeftSightLine);
            }

            case SightLine.BottomLeft:
            {
                _currentSightLine = SightLine.TopLeft;
                return(topLeftSightLine);
            }

            case SightLine.TopLeft:
            {
                _currentSightLine = SightLine.TopRight;
                return(topRightSightLine);
            }

            case SightLine.TopRight:
            {
                _currentSightLine = SightLine.BottomRight;
                return(bottomRightSightLine);
            }

            default:
                throw new ArgumentOutOfRangeException();
            }
        }