public void MakeEmpty() { Type = Types.Empty; Rotate = Rotates.Up; FColor = ConsoleColor.White; BColor = ConsoleColor.Black; }
public Cell(Types type, Rotates rotate) { switch (type) { case Types.Player: FColor = ConsoleColor.Green; BColor = ConsoleColor.Black; Health = 5; break; case Types.Enemy: FColor = ConsoleColor.Red; BColor = ConsoleColor.Black; Health = 1; break; case Types.Boss: FColor = ConsoleColor.Black; BColor = ConsoleColor.Red; Health = 10; break; default: FColor = ConsoleColor.White; BColor = ConsoleColor.Black; Health = -1; break; } this.Type = type; this.Rotate = rotate; MadeStep = false; }
public Bullet(int x, int y, Rotates direction, bool isEnemys) { this.x = x; this.y = y; this.direction = direction; IsActive = true; this.isEnemys = isEnemys; }
public Bullet(bool active) { x = 0; y = 0; direction = Rotates.Up; IsActive = false; isEnemys = true; }
public void TurnLeft() { Rotate = (Rotates)((int)Rotate - 1 >= 0 ? (int)Rotate - 1 : 3); }
public void TurnRight() { Rotate = (Rotates)(((int)Rotate + 1) % 4); }
public static void Rotate(Rotates rotateTo) { for (var j = 0; j < 4; j++) { SwapChars(CubeUtils.RotateRings[rotateTo][0], CubeUtils.RotateRings[rotateTo][j]); } }
public static Directions[] Rotates2Ring(Rotates rotateTo) { if (rotateTo.Equals(Rotates.Around)) { return AroundRing; } if (rotateTo.Equals(Rotates.Side)) { return SideRing; } if (rotateTo.Equals(Rotates.Forward)) { return ForwardRing; } return null; }
public static Directions Rotates2InvariantDirection(Rotates rotate) { if (rotate.Equals(Rotates.Around)) { return Directions.Top; } if (rotate.Equals(Rotates.Side)) { return Directions.Back; } if (rotate.Equals(Rotates.Forward)) { return Directions.Right; } return Directions.Top; }
public void Rotate(Rotates rotateTo) { RotateMemory.Add(rotateTo); for (var j = 1; j < 4; j++) { SwapColores(CubeUtils.RotateRings[rotateTo][0], CubeUtils.RotateRings[rotateTo][j]); } SwapSides(CubeUtils.RotateRings[rotateTo][0], CubeUtils.RotateRings[rotateTo][1]); }