static void Postfix(JetFlame __instance) { if (Entry.options.targetType != TargetType.Flames) { return; } TargetFlames target = Entry.target as TargetFlames; if (target == null) { return; } if (!Entry.options.discoFlames) { return; } Color color = new Color(Random.value, Random.value, Random.value, 1); target.AddMaterial(__instance.propertyBlock_, (Object obj, Color value) => { var mat = obj as MaterialPropertyBlock; mat.SetColor(JetFlame.id_EmitColor1_, color); mat.SetColor(JetFlame.id_EmitColor2_, color); __instance.renderer_.SetPropertyBlock(mat); }, "JetFlame"); }
static void Postfix(BackLightsWidget __instance) { if (Entry.options.targetType != TargetType.Flames) { return; } TargetFlames target = Entry.target as TargetFlames; if (target == null) { return; } target.AddMaterial(__instance.backLightMat_, (Object obj, Color value) => { var mat = obj as Material; if (mat == null) { return; } mat.SetColor("_Color", value); mat.SetColor("_Color2", value); }, "Backlight"); }