1+ /// OSVR-Unity Demo
2+ ///
3+ /// http://sensics.com/osvr
4+ ///
5+ /// <copyright>
6+ /// Copyright 2014 Sensics, Inc.
7+ ///
8+ /// Licensed under the Apache License, Version 2.0 (the "License");
9+ /// you may not use this file except in compliance with the License.
10+ /// You may obtain a copy of the License at
11+ ///
12+ /// http://www.apache.org/licenses/LICENSE-2.0
13+ ///
14+ /// Unless required by applicable law or agreed to in writing, software
15+ /// distributed under the License is distributed on an "AS IS" BASIS,
16+ /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17+ /// See the License for the specific language governing permissions and
18+ /// limitations under the License.
19+ /// </copyright>
20+
121/// <summary>
222/// Author: Bob Berkebile
323/// Email: bob@bullyentertainment.com || bobb@pixelplacement.com
@@ -29,11 +49,11 @@ public class ColorManager : MonoBehaviour
2949{
3050 void OnGUI ( )
3151 {
32- if ( GUILayout . Button ( "Color Up" ) )
52+ if ( GUILayout . Button ( "Color Up" ) )
3353 {
3454 ChangeColorNext ( ) ;
3555 }
36- if ( GUILayout . Button ( "Color Down" ) )
56+ if ( GUILayout . Button ( "Color Down" ) )
3757 {
3858 ChangeColorPrevious ( ) ;
3959 }
@@ -74,13 +94,13 @@ public static void Unregister( IColorChanger colorChanger )
7494
7595 public void ChangeColor ( int index )
7696 {
77- if ( index > colors . Length - 1 || index < 0 )
97+ if ( index > colors . Length - 1 || index < 0 )
7898 {
7999 Debug . LogError ( "Color value out of range." ) ;
80100 return ;
81101 }
82102
83- ApplyColor ( colors [ index ] . color ) ;
103+ ApplyColor ( colors [ index ] . color ) ;
84104 }
85105
86106 public void ChangeColor ( string name )
@@ -96,7 +116,7 @@ public void ChangeColor( string name )
96116 }
97117 }
98118
99- if ( found != null )
119+ if ( found != null )
100120 {
101121 ApplyColor ( found . color ) ;
102122 } else {
@@ -120,7 +140,7 @@ public void ChangeColorPrevious()
120140 #region Private Methods
121141 void ApplyColor ( Color color )
122142 {
123- foreach ( IColorChanger item in _colorChangers )
143+ foreach ( IColorChanger item in _colorChangers )
124144 {
125145 item . ChangeColor ( color ) ;
126146 }
0 commit comments