工具箱之父小程序源码(二)--萌宠大作战部分

微信小程序搜一搜工具箱之父

工具箱之父小程序源码(二)--萌宠大作战部分_第1张图片

.game-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.game-canvas {
  width: 100%;
  height: 100%;
}

/* 游戏信息样式 */
.game-info {
  position: absolute;
  top: 40rpx;
  left: 40rpx;
  right: 40rpx;
  color: #fff;
  font-size: 32rpx;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20rpx;
}

.hearts-container {
  display: inline-flex;
  margin-left: 10rpx;
}

.heart {
  color: #ff4444;
  margin-right: 10rpx;
}

.heart.empty {
  color: #666;
}

/* Buff状态样式 */
.buff-status {
  position: absolute;
  top: 160rpx;
  right: 40rpx;
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.buff-item {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.6);
  padding: 10rpx;
  border-radius: 10rpx;
}

.buff-icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 10rpx;
}

.buff-timer {
  color: #fff;
  font-size: 24rpx;
}

/* 天气提示样式 */
.weather-indicator {
  position: absolute;
  top: 40rpx;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.6);
  padding: 10rpx 20rpx;
  border-radius: 20rpx;
}

.weather-icon {
  width: 48rpx;
  height: 48rpx;
  margin-right: 10rpx;
}

.weather-effect {
  color: #fff;
  font-size: 28rpx;
}

/* 游戏结束界面样式 */
.game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-over.hidden {
  display: none;
}

.game-over-content {
  background-color: rgba(0, 0, 0, 0.9);
  padding: 60rpx;
  border-radius: 20rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 2rpx solid rgba(255,255,255,0.1);
}

.game-over-title {
  color: #fff;
  font-size: 48rpx;
  margin-bottom: 40rpx;
  font-weight: bold;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30rpx;
  margin-bottom: 40rpx;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-label {
  color: #999;
  font-size: 24rpx;
  margin-bottom: 10rpx;
}

.stat-value {
  color: #fff;
  font-size: 36rpx;
  font-weight: bold;
}

.achievement-unlocked {
  background: rgba(255,215,0,0.1);
  padding: 20rpx;
  border-radius: 10rpx;
  margin-bottom: 40rpx;
  text-align: center;
}

.achievement-title {
  color: #ffd700;
  font-size: 28rpx;
  margin-bottom: 10rpx;
  display: block;
}

.achievement-name {
  color: #fff;
  font-size: 32rpx;
  font-weight: bold;
  margin-bottom: 10rpx;
  display: block;
}

.achievement-desc {
  color: #999;
  font-size: 24rpx;
}

你可能感兴趣的:(微信小程序从零到万,微信小程序,游戏,王者荣耀)