public void PickUpBrick()
 {
     if (playerInventory.HasRoomForMoreBricks())
     {
         playerInventory.AddBrick(InputManager.brickInContact);
         playerData.bricksInInventory = playerInventory.bricksCount;
     }
 }
Beispiel #2
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.gameObject.tag == "Brick" && enemyInventory.HasRoomForMoreBricks())
     {
         enemyInventory.AddBrick(other.gameObject);
         BricksOnGroundController.RemoveBrick(other.gameObject.transform);
     }
 }