public Slot CheckGateCollisions(Hand h)
 {
     Slot t = null;
     allSlots.ForEach(delegate(Slot s)
     {
         if (!s.IsEmpty)
         {
             if (s.Holding.Area.Contains(h.X, h.Y))
                 t = s;
         }
     });
     return t;
 }
        public CircuitBoard(string TextureName, ContentManager Content)
        {
            this.Content = Content;
            this.Texture = Content.Load<Texture2D>(TextureName);

            //Instantiate Hand
            playerHand = new Hand(this.Content.Load<Texture2D>("Crosshair"), this);
            allSlots = new List<Slot>();
            allOutputs = new BoardOutputs();
            allInputs = new BoardInputs();

            //Load XML level file below
            allOutputs.UpdateAllOutputs();
        }
Exemple #3
0
 public Slot CheckGateCollisions(Hand h)
 {
     Slot t = null;
     allSlots.ForEach(delegate(HolderSlot s)
     {
         if (!s.IsEmpty)
         {
             if (s.Holding.Area.Contains(h.X, h.Y))
                 t = s;
         }
     });
     if (t != null) this.IsVisible = false;
     return t;
 }
Exemple #4
0
 //Explicit implementation to be called by Hand when object is grabbed
 void IGamePiece.Update(Hand h)
 {
     this.Loc = h.Loc;
 }