예제 #1
0
 public HolderSlot(Texture2D Texture, Vector2 Loc, string Name, Type Gate, CircuitBoard Home)
     : base(Texture, Loc, Name)
 {
     this.gateClass = Gate;
     this.home = Home;
     this.SlotGate(Home.NewGateAt(Vector2.Zero, Gate));
 }
예제 #2
0
        public Inventory(Microsoft.Xna.Framework.Content.ContentManager Content, CircuitBoard Home)
        {
            allSlots = new List<HolderSlot>();
            Texture2D texture = Content.Load<Texture2D>("SlotBG");
            this.IsVisible = false;
            myTexture = Content.Load<Texture2D>("Toolbox");

            allSlots.Add(new HolderSlot(texture, ANDLoc, "AND", typeof(ANDGate), Home));
            allSlots.Add(new HolderSlot(texture, INVLoc, "INV", typeof(INVGate), Home));
            allSlots.Add(new HolderSlot(texture, ORLoc, "OR", typeof(ORGate), Home));
            allSlots.Add(new HolderSlot(texture, XORLoc, "XOR", typeof(XORGate), Home));
            allSlots.Add(new HolderSlot(texture, MUXLoc, "MUX", typeof(MUXGate), Home));
        }
예제 #3
0
        public Hand(Texture2D Texture, CircuitBoard Board)
        {
            this.Texture = Texture;
            this.Board = Board;
            this.Holding = null;

            offset = new Vector2(Texture.Width / 2, Texture.Height / 2);
            gateChoice = 0;
            font = Board.GetFont("SpriteFont1");
            gateTypes = new Dictionary<int, Type>();
            gateTypes.Add(0, typeof(INVGate));
            gateTypes.Add(1, typeof(ANDGate));
            gateTypes.Add(2, typeof(ORGate));
            gateTypes.Add(3, typeof(XORGate));
            gateTypes.Add(4, typeof(MUXGate));
        }
예제 #4
0
 public ALU(CircuitBoard myALU)
 {
     this.myALU = myALU;
 }
예제 #5
0
 public INVGate(CircuitBoard Home, Vector2 Loc)
     : base(Home.GetTexture("DII"), Loc)
 {
 }
예제 #6
0
 public ANDGate(CircuitBoard Home, Vector2 Loc)
     : base(Home.GetTexture("A0-B3"), Loc)
 {
 }
예제 #7
0
 public ORGate(CircuitBoard Home, Vector2 Loc)
     : base(Home.GetTexture("A0393"), Loc)
 {
 }