public static void DrawFlickeringSprite(SpriteBatch sb, Rectangle dest, Texture2D texture, float maxOffset, float rarity, object os_Obj, Color BaseCol) { OS os = (OS)null; if (os_Obj != null) { os = (OS)os_Obj; } else { FlickeringTextEffect.internalTimer += 0.01666667f; } Color color1 = new Color((int)BaseCol.R, 0, 0, 0); Color color2 = new Color(0, (int)BaseCol.G, 0, 0); Color color3 = new Color(0, 0, (int)BaseCol.B, 0); sb.Draw(texture, FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(1.3f, 12.3f, rarity, (object)os))), color1); sb.Draw(texture, FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(0.8f, 29f, rarity, (object)os))), color2); sb.Draw(texture, FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(0.5f, -939.7f, rarity, (object)os))), color3); }
public static void DrawFlickeringText(Rectangle dest, string text, float maxOffset, float rarity, SpriteFont font, object os_Obj, Color BaseCol) { OS os = (OS)null; if (os_Obj != null) { os = (OS)os_Obj; } else { FlickeringTextEffect.internalTimer += 0.01666667f; } Color color1 = new Color((int)BaseCol.R, 0, 0, 0); Color color2 = new Color(0, (int)BaseCol.G, 0, 0); Color color3 = new Color(0, 0, (int)BaseCol.B, 0); TextItem.doFontLabelToSize(FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(1.3f, 12.3f, rarity, (object)os))), text, font, color1, false, false); TextItem.doFontLabelToSize(FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(0.8f, 29f, rarity, (object)os))), text, font, color2, false, false); TextItem.doFontLabelToSize(FlickeringTextEffect.RectAddX(dest, (int)((double)maxOffset * (double)FlickeringTextEffect.GetOffsetForSinTime(0.5f, -939.7f, rarity, (object)os))), text, font, color3, false, false); }