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 CustomInfoJetFlame getJetFlameInfos(JetFlame f) { CustomInfoJetFlame data = new CustomInfoJetFlame(); data.rotationAxis = f.rotationAxis_; return(data); }
static void Postfix(JetFlame __instance) { if (!Entry.Config.GetItem <bool>("DiscoFlames")) { return; } Color color = new Color(Random.value, Random.value, Random.value, 1); __instance.propertyBlock_.SetColor(JetFlame.id_EmitColor1_, color); __instance.propertyBlock_.SetColor(JetFlame.id_EmitColor2_, color); __instance.renderer_.SetPropertyBlock(__instance.propertyBlock_); }