public void SetLightType(int t) { if (t < 12) { lightAnimation e = (lightAnimation)t; lightType = e; } else { Debug.LogError("You are trying to manually change Light Type on " + this.name + ". Integer value must be 0 - 11."); } }
void GetAnimationType() { animationKeyFrames.Clear(); switch (lightType) { case lightAnimation.standard: SetKeyFrames_Standard(); break; case lightAnimation.pulseSlow: SetKeyFrames_PulseSlow(); break; case lightAnimation.pulseFast: SetKeyFrames_PulseFast(); break; case lightAnimation.flicker1: SetKeyFrames_Flicker1(); break; case lightAnimation.flicker2: SetKeyFrames_Flicker2(); break; case lightAnimation.flicker3: SetKeyFrames_Flicker3(); break; case lightAnimation.strobe: SetKeyFrames_Strobe(); break; case lightAnimation.candle: SetKeyFrames_Candle(); break; case lightAnimation.fire: SetKeyFrames_Fire(); break; case lightAnimation.television: SetKeyFrames_TV(); break; case lightAnimation.storm: SetKeyFrames_Storm(); break; } prevLightType = lightType; }