Esempio n. 1
0
 public void MakeEmpty()
 {
     Type   = Types.Empty;
     Rotate = Rotates.Up;
     FColor = ConsoleColor.White;
     BColor = ConsoleColor.Black;
 }
Esempio n. 2
0
            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;
            }
Esempio n. 3
0
 public Bullet(int x, int y, Rotates direction, bool isEnemys)
 {
     this.x         = x;
     this.y         = y;
     this.direction = direction;
     IsActive       = true;
     this.isEnemys  = isEnemys;
 }
Esempio n. 4
0
 public Bullet(bool active)
 {
     x         = 0;
     y         = 0;
     direction = Rotates.Up;
     IsActive  = false;
     isEnemys  = true;
 }
Esempio n. 5
0
 public void TurnLeft()
 {
     Rotate = (Rotates)((int)Rotate - 1 >= 0 ? (int)Rotate - 1 : 3);
 }
Esempio n. 6
0
 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;
        }
Esempio n. 10
0
        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]);
        }