Exemplo n.º 1
0
 public FrameInput(short horiz, short vert, bool fire, bool focus, bool bomb, bool meter,
                   bool dialogueConfirm, bool dialogueToEnd, bool dialogueSkip)
 {
     horizontal = horiz;
     vertical   = vert;
     data1      = BitCompression.FromBools(fire, focus, bomb, meter, dialogueConfirm, dialogueToEnd, dialogueSkip);
 }
Exemplo n.º 2
0
        public void BitField()
        {
            var b = BitCompression.FromBools(true, false, false, false, true, false, false, true);

            Assert.IsTrue(b.NthBool(0) && b.NthBool(4) && b.NthBool(7));
            Assert.IsFalse(b.NthBool(1) || b.NthBool(2) || b.NthBool(3) || b.NthBool(5) || b.NthBool(6));
        }