feat: Add block breaking, HUD, and inventory system for player
This commit is contained in:
54
styles.css
54
styles.css
@@ -75,3 +75,57 @@ body {
|
||||
background-color: #000;
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
#player-hud {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
left: 10px;
|
||||
width: 300px;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
color: white;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
font-family: Arial, sans-serif;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
#health-bar-container {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
margin-bottom: 10px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
#health-bar {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #4CAF50;
|
||||
border-radius: 3px;
|
||||
transition: width 0.3s;
|
||||
}
|
||||
|
||||
#inventory-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.inventory-slot {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 10px;
|
||||
position: relative;
|
||||
transition: transform 0.1s;
|
||||
}
|
||||
|
||||
.inventory-slot:hover {
|
||||
transform: scale(1.1);
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user