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
{
Normal = 0,
Blue = 1,
Yellow = 2,
Custom = 3
Normal,
Blue,
Yellow,
Custom
}
public Color[] LightBulbColors;
public enum BackgroundType
{
Yellow = 0,
Fushia = 1,
Blue = 2,
Red = 3,
Orange = 4,
Pink = 5,
Custom = 6
Yellow,
Fushia,
Blue,
Red,
Orange,
Pink,
Custom
}
public Color[] LightBulbColors;
public Color[] BackgroundColors;
const float hitVoiceOffset = 0.042f;

View File

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