Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1.     public class TestBlock {
  2.  
  3.         public Direction Facing {
  4.             get {
  5.                 if (_facing[0] == false && _facing[1] == false)
  6.                     return Direction.North;
  7.                 else if (_facing[0] == false && _facing[1] == true)
  8.                     return Direction.East;
  9.                 else if (_facing[0] == true && _facing[1] == false)
  10.                     return Direction.South;
  11.                 else
  12.                     return Direction.West;
  13.             }
  14.         }
  15.  
  16.         BitArray _facing = new BitArray(2);
  17.         BitArray _subType = new BitArray(4);
  18.     }
  19.  
  20.     public enum Direction : byte {
  21.         North = 0x00,
  22.         East = 0x01,
  23.         South = 0x02,
  24.         West = 0x03
  25.     }
Add Comment
Please, Sign In to add comment