Code Clean Up

This commit is contained in:
Carson Kompon 2022-02-26 13:57:09 -05:00
parent c745bb5389
commit a4985675c4
2 changed files with 16 additions and 16 deletions

View file

@ -10,25 +10,24 @@ namespace RhythmHeavenMania.Games.KarateMan
{ {
public enum LightBulbType public enum LightBulbType
{ {
Normal = 0, Normal,
Blue = 1, Blue,
Yellow = 2, Yellow,
Custom = 3 Custom
} }
public Color[] LightBulbColors;
public enum BackgroundType public enum BackgroundType
{ {
Yellow = 0, Yellow,
Fushia = 1, Fushia,
Blue = 2, Blue,
Red = 3, Red,
Orange = 4, Orange,
Pink = 5, Pink,
Custom = 6 Custom
} }
public Color[] LightBulbColors;
public Color[] BackgroundColors; public Color[] BackgroundColors;
const float hitVoiceOffset = 0.042f; const float hitVoiceOffset = 0.042f;

View file

@ -233,8 +233,8 @@ namespace RhythmHeavenMania
new GameAction("bulb", delegate { new GameAction("bulb", delegate {
var e = eventCaller.currentEntity; var e = eventCaller.currentEntity;
var c = KarateMan.instance.LightBulbColors[e.type]; var c = KarateMan.instance.LightBulbColors[e.type];
if(e.type == 3) c = e.colorA; if(e.type == (int)KarateMan.LightBulbType.Custom) c = e.colorA;
KarateMan.instance.Shoot(eventCaller.currentEntity.beat, 1, tint: c); KarateMan.instance.Shoot(e.beat, 1, tint: c);
}, 2, false, new List<Param>() }, 2, false, new List<Param>()
{ {
new Param("type", KarateMan.LightBulbType.Normal, "Type"), new Param("type", KarateMan.LightBulbType.Normal, "Type"),
@ -252,7 +252,8 @@ namespace RhythmHeavenMania
new GameAction("set background color", delegate { new GameAction("set background color", delegate {
var e = eventCaller.currentEntity; var e = eventCaller.currentEntity;
var c = KarateMan.instance.BackgroundColors[e.type]; var c = KarateMan.instance.BackgroundColors[e.type];
if(e.type == 6) c = e.colorA; if(e.type == (int)KarateMan.BackgroundType.Custom) c = e.colorA;
Debug.Log("type - " + e.type.ToString());
KarateMan.instance.SetBackgroundColor(c); KarateMan.instance.SetBackgroundColor(c);
}, 1f, false, new List<Param>() }, 1f, false, new List<Param>()
{ {