示例#1
0
 public AsciiObject(char[][] chars, char emptyChar, int x, int y, int z = 0, GridCollideMethod collideMethod = GridCollideMethod.Ignore, AsciiVector vector = null)
 {
     Chars    = Utils.CreateObject(chars, emptyChar);
     X        = x;
     Y        = y;
     Collider = new AsciiCollider(Width, Height, collideMethod);
     Vector   = vector ?? AsciiVector.Zero;
 }
示例#2
0
 /// <summary>
 /// Creates a new <see cref="AsciiObject"/> with a specified string value, separator character, empty character, and its initial X and Y values.
 /// </summary>
 public AsciiObject(string value, char separatorChar, char emptyChar, int x, int y, int z = 0, GridCollideMethod collideMethod = GridCollideMethod.Ignore, AsciiVector vector = null)
 {
     Chars    = Utils.CreateObject(value, separatorChar, emptyChar);
     X        = x;
     Y        = y;
     Z        = z;
     Collider = new AsciiCollider(Width, Height, collideMethod);
     Vector   = vector ?? AsciiVector.Zero;
 }
示例#3
0
 public void CreateAndAddObject(char[][] chars, int x, int y, int z = 0, GridCollideMethod collideMethod = GridCollideMethod.Ignore, AsciiVector vector = null)
 {
     Objects.Add(new AsciiObject(chars, EmptyChar, x, y, z, collideMethod, vector));
 }
示例#4
0
 public void CreateAndAddObject(string value, char separatorChar, int x, int y, int z = 0, GridCollideMethod collideMethod = GridCollideMethod.Ignore, AsciiVector vector = null)
 {
     Objects.Add(new AsciiObject(value, separatorChar, EmptyChar, x, y, z, collideMethod, vector));
 }
示例#5
0
 /// <summary>
 /// Gets the raw point of a value defined by its initial point and vector after a specified amount of time.
 /// </summary>
 public static PointF GetRawPos(int x, int y, AsciiVector vector, float time)
 {
     return(new PointF(GetRawDist(x, vector.VX, vector.AX, time), GetRawDist(y, vector.VY, vector.AY, time)));
 }