コード例 #1
0
 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;
 }
コード例 #2
0
        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();
        }
コード例 #3
0
ファイル: Inventory.cs プロジェクト: Evangielis/TheAssembler
 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;
 }
コード例 #4
0
ファイル: Gate.cs プロジェクト: Evangielis/TheAssembler
 //Explicit implementation to be called by Hand when object is grabbed
 void IGamePiece.Update(Hand h)
 {
     this.Loc = h.Loc;
 }