Fix issues after compiling

This commit is contained in:
2025-09-10 11:32:19 -07:00
parent c9f20f3c47
commit 7c8c419c6e

View File

@@ -32,7 +32,6 @@ public class CustomColorObject : MonoBehaviour
public void SetColor() public void SetColor()
{ {
dynamic obj = null;
JArray color = null; JArray color = null;
Color colorType = Color.white; Color colorType = Color.white;
Color currentColor = Color.white; Color currentColor = Color.white;
@@ -43,7 +42,7 @@ public class CustomColorObject : MonoBehaviour
color = BazookaManager.Instance.GetColorSettingBackground(); color = BazookaManager.Instance.GetColorSettingBackground();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<Camera>(); var obj = gameObject.GetComponent<Camera>();
currentColor = obj.backgroundColor; currentColor = obj.backgroundColor;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
@@ -65,67 +64,67 @@ public class CustomColorObject : MonoBehaviour
color = BazookaManager.Instance.GetColorSettingMenuBackground(); color = BazookaManager.Instance.GetColorSettingMenuBackground();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<Image>(); var obj2 = gameObject.GetComponent<Image>();
currentColor = obj.color; currentColor = obj2.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj2.color = currentColor;
break; break;
case ColorObjectType.MenuBackgroundColorText: case ColorObjectType.MenuBackgroundColorText:
color = BazookaManager.Instance.GetColorSettingMenuBackground(); color = BazookaManager.Instance.GetColorSettingMenuBackground();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<TMP_Text>(); var obj3 = gameObject.GetComponent<TMP_Text>();
currentColor = obj.color; currentColor = obj3.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj3.color = currentColor;
break; break;
case ColorObjectType.ButtonColor: case ColorObjectType.ButtonColor:
color = BazookaManager.Instance.GetColorSettingButton(); color = BazookaManager.Instance.GetColorSettingButton();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<Image>(); obj2 = gameObject.GetComponent<Image>();
currentColor = obj.color; currentColor = obj2.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj2.color = currentColor;
break; break;
case ColorObjectType.ButtonColorText: case ColorObjectType.ButtonColorText:
color = BazookaManager.Instance.GetColorSettingButton(); color = BazookaManager.Instance.GetColorSettingButton();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<TMP_Text>(); obj3 = gameObject.GetComponent<TMP_Text>();
currentColor = obj.color; currentColor = obj3.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj3.color = currentColor;
break; break;
case ColorObjectType.TextColor: case ColorObjectType.TextColor:
color = BazookaManager.Instance.GetColorSettingText(); color = BazookaManager.Instance.GetColorSettingText();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<TMP_Text>(); obj3 = gameObject.GetComponent<TMP_Text>();
currentColor = obj.color; currentColor = obj3.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj3.color = currentColor;
break; break;
case ColorObjectType.TextColorImage: case ColorObjectType.TextColorImage:
color = BazookaManager.Instance.GetColorSettingText(); color = BazookaManager.Instance.GetColorSettingText();
colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f);
colorType = ApplyModifiers(colorType); colorType = ApplyModifiers(colorType);
obj = gameObject.GetComponent<Image>(); obj2 = gameObject.GetComponent<Image>();
currentColor = obj.color; currentColor = obj2.color;
currentColor.r = colorType.r; currentColor.r = colorType.r;
currentColor.g = colorType.g; currentColor.g = colorType.g;
currentColor.b = colorType.b; currentColor.b = colorType.b;
obj.color = currentColor; obj2.color = currentColor;
break; break;
} }
} }