mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
maybe actually commit everything!
This commit is contained in:
parent
fcd898e16b
commit
8229ce8517
4 changed files with 10 additions and 4 deletions
|
@ -3,7 +3,7 @@ using System.Text.RegularExpressions;
|
||||||
namespace MLEM.Formatting.Codes {
|
namespace MLEM.Formatting.Codes {
|
||||||
public class AnimatedCode : Code {
|
public class AnimatedCode : Code {
|
||||||
|
|
||||||
public AnimatedCode(Match match) : base(match) {
|
public AnimatedCode(Match match, Regex regex) : base(match, regex) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool EndsHere(Code other) {
|
public override bool EndsHere(Code other) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace MLEM.Formatting.Codes {
|
||||||
private readonly Color color;
|
private readonly Color color;
|
||||||
private readonly Vector2 offset;
|
private readonly Vector2 offset;
|
||||||
|
|
||||||
public ShadowCode(Match match, Color color, Vector2 offset) : base(match, null) {
|
public ShadowCode(Match match, Regex regex, Color color, Vector2 offset) : base(match, regex, null) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.offset = offset;
|
this.offset = offset;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ namespace MLEM.Formatting.Codes {
|
||||||
private readonly float heightModifier;
|
private readonly float heightModifier;
|
||||||
public TimeSpan TimeIntoAnimation;
|
public TimeSpan TimeIntoAnimation;
|
||||||
|
|
||||||
public WobblyCode(Match match, float modifier, float heightModifier) : base(match) {
|
public WobblyCode(Match match, Regex regex, float modifier, float heightModifier) : base(match, regex) {
|
||||||
this.modifier = modifier;
|
this.modifier = modifier;
|
||||||
this.heightModifier = heightModifier;
|
this.heightModifier = heightModifier;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.Xna.Framework;
|
using Microsoft.Xna.Framework;
|
||||||
|
@ -34,6 +35,11 @@ namespace MLEM.Formatting {
|
||||||
return this.AppliedCodes.Select(c => c.GetFont()).FirstOrDefault();
|
return this.AppliedCodes.Select(c => c.GetFont()).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void DrawSelf(GameTime time, SpriteBatch batch, Vector2 pos, GenericFont font, Color color, float scale, float depth) {
|
||||||
|
foreach (var code in this.AppliedCodes)
|
||||||
|
code.DrawSelf(time, batch, pos, font, color, scale, depth);
|
||||||
|
}
|
||||||
|
|
||||||
public void DrawCharacter(GameTime time, SpriteBatch batch, char c, string cString, int indexInToken, Vector2 pos, GenericFont font, Color color, float scale, float depth) {
|
public void DrawCharacter(GameTime time, SpriteBatch batch, char c, string cString, int indexInToken, Vector2 pos, GenericFont font, Color color, float scale, float depth) {
|
||||||
foreach (var code in this.AppliedCodes) {
|
foreach (var code in this.AppliedCodes) {
|
||||||
if (code.DrawCharacter(time, batch, c, cString, indexInToken, ref pos, font, ref color, ref scale, depth))
|
if (code.DrawCharacter(time, batch, c, cString, indexInToken, ref pos, font, ref color, ref scale, depth))
|
||||||
|
|
Loading…
Reference in a new issue