feat: 优化入口页面并新增房主等待房间原型在入口页面入口页面.html中,将单个“开始游戏”按钮替换为“快速开始”、“自动匹配”、“创建房间”和“加入游戏”四个游戏模式选项,并重构按钮样式。新增房主视角的房间等待页面原型房间等待[房主].html及其线框图方案。
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
{
|
||||
"from": "initial",
|
||||
"command": "action",
|
||||
"timestamp": "2025-09-10T09:45:59.716Z",
|
||||
"timestamp": "2025-09-11T00:58:40.753Z",
|
||||
"args": [
|
||||
"prototype-designer"
|
||||
]
|
||||
@@ -12,7 +12,7 @@
|
||||
{
|
||||
"from": "role_activated_with_memory",
|
||||
"command": "init",
|
||||
"timestamp": "2025-09-10T09:46:10.631Z",
|
||||
"timestamp": "2025-09-11T00:58:56.984Z",
|
||||
"args": [
|
||||
{
|
||||
"workingDirectory": "e:/我的项目/DFJ/新DFJ"
|
||||
@@ -22,17 +22,17 @@
|
||||
{
|
||||
"from": "initialized",
|
||||
"command": "welcome",
|
||||
"timestamp": "2025-09-10T09:46:22.721Z",
|
||||
"timestamp": "2025-09-11T00:59:09.325Z",
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"from": "service_discovery",
|
||||
"command": "action",
|
||||
"timestamp": "2025-09-10T09:46:32.635Z",
|
||||
"timestamp": "2025-09-11T00:59:24.773Z",
|
||||
"args": [
|
||||
"prototype-designer"
|
||||
]
|
||||
}
|
||||
],
|
||||
"lastUpdated": "2025-09-10T09:46:32.830Z"
|
||||
"lastUpdated": "2025-09-11T00:59:24.952Z"
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"metadata": {
|
||||
"version": "2.0.0",
|
||||
"description": "project 级资源注册表",
|
||||
"createdAt": "2025-09-10T09:46:10.664Z",
|
||||
"updatedAt": "2025-09-10T09:46:10.669Z",
|
||||
"createdAt": "2025-09-11T00:58:57.004Z",
|
||||
"updatedAt": "2025-09-11T00:58:57.015Z",
|
||||
"resourceCount": 3
|
||||
},
|
||||
"resources": [
|
||||
@@ -17,9 +17,9 @@
|
||||
"description": "思维模式,指导AI的思考方式",
|
||||
"reference": "@project://.promptx/resource/role/prototype-designer/design-thinking.thought.md",
|
||||
"metadata": {
|
||||
"createdAt": "2025-09-10T09:46:10.667Z",
|
||||
"updatedAt": "2025-09-10T09:46:10.667Z",
|
||||
"scannedAt": "2025-09-10T09:46:10.667Z",
|
||||
"createdAt": "2025-09-11T00:58:57.009Z",
|
||||
"updatedAt": "2025-09-11T00:58:57.009Z",
|
||||
"scannedAt": "2025-09-11T00:58:57.009Z",
|
||||
"path": "role/prototype-designer/design-thinking.thought.md"
|
||||
}
|
||||
},
|
||||
@@ -31,9 +31,9 @@
|
||||
"description": "执行模式,定义具体的行为模式",
|
||||
"reference": "@project://.promptx/resource/role/prototype-designer/design-workflow.execution.md",
|
||||
"metadata": {
|
||||
"createdAt": "2025-09-10T09:46:10.667Z",
|
||||
"updatedAt": "2025-09-10T09:46:10.667Z",
|
||||
"scannedAt": "2025-09-10T09:46:10.667Z",
|
||||
"createdAt": "2025-09-11T00:58:57.010Z",
|
||||
"updatedAt": "2025-09-11T00:58:57.010Z",
|
||||
"scannedAt": "2025-09-11T00:58:57.010Z",
|
||||
"path": "role/prototype-designer/design-workflow.execution.md"
|
||||
}
|
||||
},
|
||||
@@ -45,9 +45,9 @@
|
||||
"description": "专业角色,提供特定领域的专业能力",
|
||||
"reference": "@project://.promptx/resource/role/prototype-designer/prototype-designer.role.md",
|
||||
"metadata": {
|
||||
"createdAt": "2025-09-10T09:46:10.668Z",
|
||||
"updatedAt": "2025-09-10T09:46:10.668Z",
|
||||
"scannedAt": "2025-09-10T09:46:10.668Z",
|
||||
"createdAt": "2025-09-11T00:58:57.012Z",
|
||||
"updatedAt": "2025-09-11T00:58:57.012Z",
|
||||
"scannedAt": "2025-09-11T00:58:57.012Z",
|
||||
"path": "role/prototype-designer/prototype-designer.role.md"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -364,32 +364,39 @@
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* 开始按钮 */
|
||||
.start-button {
|
||||
/* 游戏模式按钮容器 */
|
||||
.game-modes {
|
||||
width: 100%;
|
||||
max-width: 300px;
|
||||
max-width: 350px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
/* 主要按钮样式 */
|
||||
.btn-primary {
|
||||
min-height: var(--touch-target-min);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 16px 32px;
|
||||
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
|
||||
padding: 14px 24px;
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
|
||||
color: #ffffff;
|
||||
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
|
||||
box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
gap: 8px;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.start-button::before {
|
||||
.btn-primary::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -402,23 +409,131 @@
|
||||
transition: width 0.3s, height 0.3s;
|
||||
}
|
||||
|
||||
.start-button:hover {
|
||||
.btn-primary:hover, .btn-primary:focus {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 12px 35px rgba(99, 102, 241, 0.5);
|
||||
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
|
||||
}
|
||||
|
||||
.start-button:active {
|
||||
.btn-primary:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
|
||||
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
|
||||
}
|
||||
|
||||
.start-button:active::before {
|
||||
.btn-primary:active::before {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 成功按钮样式 */
|
||||
.btn-success {
|
||||
min-height: var(--touch-target-min);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 14px 24px;
|
||||
background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
|
||||
color: #1a1a2e;
|
||||
box-shadow: 0 4px 16px rgba(64, 224, 208, 0.3);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-success::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: width 0.3s, height 0.3s;
|
||||
}
|
||||
|
||||
.btn-success:hover, .btn-success:focus {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 8px 25px rgba(64, 224, 208, 0.4);
|
||||
}
|
||||
|
||||
.btn-success:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 2px 8px rgba(64, 224, 208, 0.4);
|
||||
}
|
||||
|
||||
.btn-success:active::before {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 次要按钮样式 */
|
||||
.btn-secondary {
|
||||
min-height: var(--touch-target-min);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 14px 24px;
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
color: var(--primary-color);
|
||||
border: 1px solid var(--primary-color);
|
||||
backdrop-filter: blur(10px);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
user-select: none;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.btn-secondary::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 0;
|
||||
height: 0;
|
||||
background: rgba(99, 102, 241, 0.2);
|
||||
border-radius: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
transition: width 0.3s, height 0.3s;
|
||||
}
|
||||
|
||||
.btn-secondary:hover, .btn-secondary:focus {
|
||||
background: rgba(99, 102, 241, 0.25);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.btn-secondary:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.btn-secondary:active::before {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.button-icon {
|
||||
font-size: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.button-subtitle {
|
||||
font-size: 12px;
|
||||
opacity: 0.8;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
/* 响应式设计 */
|
||||
@@ -508,11 +623,7 @@
|
||||
<main class="main-content">
|
||||
<!-- 游戏标题卡片 -->
|
||||
<div class="title-card">
|
||||
<div class="plane-decoration top-left">✈️</div>
|
||||
<div class="plane-decoration top-right">✈️</div>
|
||||
<div class="plane-decoration bottom-left">✈️</div>
|
||||
<div class="plane-decoration bottom-right">✈️</div>
|
||||
|
||||
<div class="plane-decoration">✈️</div>
|
||||
<h1 class="game-title">打飞机对战</h1>
|
||||
<p class="game-subtitle">经典策略游戏,智慧与技巧的较量</p>
|
||||
</div>
|
||||
@@ -539,11 +650,40 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 开始按钮 -->
|
||||
<button class="start-button" id="startGame">
|
||||
<span class="button-icon">🚀</span>
|
||||
开始游戏
|
||||
</button>
|
||||
<!-- 游戏模式选择 -->
|
||||
<div class="game-modes">
|
||||
<button class="btn-primary" id="quickStart">
|
||||
<span class="button-icon">🤖</span>
|
||||
<div>
|
||||
<div>快速开始</div>
|
||||
<div class="button-subtitle">和AI对战</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button class="btn-success" id="onlineMatch">
|
||||
<span class="button-icon">🌐</span>
|
||||
<div>
|
||||
<div>自动匹配</div>
|
||||
<div class="button-subtitle">在线匹配对战</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button class="btn-secondary" id="createRoom">
|
||||
<span class="button-icon">🏠</span>
|
||||
<div>
|
||||
<div>创建房间</div>
|
||||
<div class="button-subtitle">邀请好友对战</div>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button class="btn-secondary" id="joinGame">
|
||||
<span class="button-icon">🎯</span>
|
||||
<div>
|
||||
<div>加入游戏</div>
|
||||
<div class="button-subtitle">输入房间号</div>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
@@ -576,13 +716,37 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 开始游戏按钮点击事件
|
||||
document.getElementById('startGame').addEventListener('click', () => {
|
||||
// 这里可以添加跳转到游戏页面的逻辑
|
||||
console.log('开始游戏');
|
||||
// 游戏模式按钮点击事件
|
||||
document.getElementById('quickStart').addEventListener('click', () => {
|
||||
console.log('快速开始 - 和AI对战');
|
||||
if ('vibrate' in navigator) {
|
||||
navigator.vibrate(20);
|
||||
navigator.vibrate(15);
|
||||
}
|
||||
// 这里可以添加跳转到AI对战页面的逻辑
|
||||
});
|
||||
|
||||
document.getElementById('onlineMatch').addEventListener('click', () => {
|
||||
console.log('自动匹配 - 在线匹配对战');
|
||||
if ('vibrate' in navigator) {
|
||||
navigator.vibrate(15);
|
||||
}
|
||||
// 这里可以添加跳转到匹配页面的逻辑
|
||||
});
|
||||
|
||||
document.getElementById('createRoom').addEventListener('click', () => {
|
||||
console.log('创建房间');
|
||||
if ('vibrate' in navigator) {
|
||||
navigator.vibrate(10);
|
||||
}
|
||||
// 这里可以添加跳转到创建房间页面的逻辑
|
||||
});
|
||||
|
||||
document.getElementById('joinGame').addEventListener('click', () => {
|
||||
console.log('加入游戏');
|
||||
if ('vibrate' in navigator) {
|
||||
navigator.vibrate(10);
|
||||
}
|
||||
// 这里可以添加跳转到加入游戏页面的逻辑
|
||||
});
|
||||
|
||||
// 设置按钮点击事件
|
||||
@@ -598,7 +762,10 @@
|
||||
createStarField();
|
||||
|
||||
// 为所有可点击元素添加触觉反馈
|
||||
addHapticFeedback(document.getElementById('startGame'));
|
||||
addHapticFeedback(document.getElementById('quickStart'));
|
||||
addHapticFeedback(document.getElementById('onlineMatch'));
|
||||
addHapticFeedback(document.getElementById('createRoom'));
|
||||
addHapticFeedback(document.getElementById('joinGame'));
|
||||
addHapticFeedback(document.querySelector('.settings-btn'));
|
||||
});
|
||||
</script>
|
||||
|
||||
552
01_文档/原型设计/房间等待[房主].html
Normal file
552
01_文档/原型设计/房间等待[房主].html
Normal file
@@ -0,0 +1,552 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
||||
<title>房间等待 - 打飞机对战</title>
|
||||
<style>
|
||||
/* 基础CSS变量 */
|
||||
:root {
|
||||
/* 主色调 - 深空科技蓝 */
|
||||
--primary-color: #6366f1;
|
||||
--primary-light: #8b5cf6;
|
||||
--primary-dark: #4f46e5;
|
||||
|
||||
/* 辅助色 - 科技青色 */
|
||||
--secondary-color: #40e0d0;
|
||||
--secondary-light: #26d0ce;
|
||||
|
||||
/* 强调色 - 橙色 */
|
||||
--accent-color: #f59e0b;
|
||||
--accent-light: #fbbf24;
|
||||
|
||||
/* 危险色 - 红色 */
|
||||
--danger-color: #ff4757;
|
||||
--danger-light: #ff6b6b;
|
||||
|
||||
/* 背景色系 - 深色渐变 */
|
||||
--bg-primary: #0f1419;
|
||||
--bg-secondary: #1a1d29;
|
||||
--bg-tertiary: #252837;
|
||||
--bg-elevated: #2d3142;
|
||||
|
||||
/* 渐变背景 */
|
||||
--gradient-bg: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 30%, #16213e 70%, #0f3460 100%);
|
||||
|
||||
/* 边框色系 */
|
||||
--border-primary: #3d4159;
|
||||
--border-secondary: #4a5073;
|
||||
--border-highlight: #6366f1;
|
||||
--border-accent: rgba(64, 224, 208, 0.3);
|
||||
|
||||
/* 文字色系 */
|
||||
--text-primary: #ffffff;
|
||||
--text-secondary: #b4b7c9;
|
||||
--text-tertiary: #9ca3af;
|
||||
--text-disabled: #6b7280;
|
||||
|
||||
/* 触摸目标尺寸 */
|
||||
--touch-target-min: 44px;
|
||||
--safe-area-padding: 20px;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
-webkit-touch-callout: none;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Microsoft YaHei UI", sans-serif;
|
||||
background: var(--gradient-bg);
|
||||
color: var(--text-primary);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-x: hidden;
|
||||
touch-action: manipulation;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.safe-area {
|
||||
padding-left: env(safe-area-inset-left);
|
||||
padding-right: env(safe-area-inset-right);
|
||||
padding-top: env(safe-area-inset-top);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.app-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: var(--safe-area-padding);
|
||||
max-width: 400px;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 头部导航 */
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.back-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: none;
|
||||
background: rgba(99, 102, 241, 0.15);
|
||||
border-radius: 12px;
|
||||
color: var(--primary-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.back-btn:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(99, 102, 241, 0.25);
|
||||
}
|
||||
|
||||
.room-info {
|
||||
text-align: center;
|
||||
flex: 1;
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.room-number {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.room-label {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.share-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border: none;
|
||||
background: rgba(64, 224, 208, 0.15);
|
||||
border-radius: 12px;
|
||||
color: var(--secondary-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.share-btn:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(64, 224, 208, 0.25);
|
||||
}
|
||||
|
||||
/* 主内容区域 */
|
||||
.main-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 玩家项 */
|
||||
.player-item {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
padding: 20px;
|
||||
background: rgba(22, 33, 62, 0.8);
|
||||
border: 1px solid rgba(64, 224, 208, 0.3);
|
||||
border-radius: 16px;
|
||||
backdrop-filter: blur(10px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
transition: all 0.3s ease;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
.player-item.host {
|
||||
background: rgba(99, 102, 241, 0.1);
|
||||
}
|
||||
|
||||
.player-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.player-avatar {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.ai-avatar {
|
||||
background: linear-gradient(135deg, var(--text-tertiary), var(--text-secondary));
|
||||
}
|
||||
|
||||
.player-details {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.player-name {
|
||||
font-size: 16px;
|
||||
color: var(--text-primary);
|
||||
font-weight: 600;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.player-stats {
|
||||
font-size: 14px;
|
||||
color: var(--text-secondary);
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.stat-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* 状态和操作 */
|
||||
.player-status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.status-ready {
|
||||
background: rgba(64, 224, 208, 0.2);
|
||||
color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.status-waiting {
|
||||
background: rgba(156, 163, 175, 0.2);
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
|
||||
.kick-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
background: rgba(255, 71, 87, 0.15);
|
||||
border-radius: 8px;
|
||||
color: var(--danger-color);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.kick-btn:active {
|
||||
transform: scale(0.95);
|
||||
background: rgba(255, 71, 87, 0.25);
|
||||
}
|
||||
|
||||
/* 底部操作按钮 */
|
||||
.action-area {
|
||||
margin-top: auto;
|
||||
padding-top: 20px;
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
.start-game-btn {
|
||||
width: 100%;
|
||||
min-height: var(--touch-target-min);
|
||||
border: none;
|
||||
border-radius: 12px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
padding: 16px 24px;
|
||||
background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
|
||||
color: #1a1a2e;
|
||||
box-shadow: 0 4px 16px rgba(64, 224, 208, 0.3);
|
||||
transition: box-shadow 0.3s ease, opacity 0.3s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.start-game-btn:active {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* 响应式适配 */
|
||||
@media (max-width: 375px) {
|
||||
.player-item {
|
||||
padding: 16px;
|
||||
min-height: 72px;
|
||||
}
|
||||
|
||||
.player-avatar {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.player-name {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.player-stats {
|
||||
font-size: 13px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-height: 640px) {
|
||||
.app-container {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.players-container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
/* 触觉反馈动画 */
|
||||
.haptic-feedback {
|
||||
animation: hapticVibrate 0.1s ease-out;
|
||||
}
|
||||
|
||||
@keyframes hapticVibrate {
|
||||
0%, 100% { transform: translateX(0); }
|
||||
25% { transform: translateX(-1px); }
|
||||
75% { transform: translateX(1px); }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="safe-area">
|
||||
<div class="app-container">
|
||||
<!-- 头部导航 -->
|
||||
<header class="header">
|
||||
<button class="back-btn" onclick="goBack()">
|
||||
←
|
||||
</button>
|
||||
<div class="room-info">
|
||||
<div class="room-number">123456</div>
|
||||
<div class="room-label">房间号</div>
|
||||
</div>
|
||||
<button class="share-btn" onclick="shareRoomCode()">
|
||||
📋
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<!-- 主内容 -->
|
||||
<main class="main-content">
|
||||
<!-- 房主信息 -->
|
||||
<div class="player-item host">
|
||||
<div class="player-info">
|
||||
<div class="player-avatar">张</div>
|
||||
<div class="player-details">
|
||||
<div class="player-name">张三(房主)</div>
|
||||
<div class="player-stats">
|
||||
<div class="stat-item">
|
||||
<span>🏆</span>
|
||||
<span>156场</span>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<span>📊</span>
|
||||
<span>68%胜率</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-status">
|
||||
<div class="status-badge status-ready">✅准备</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AI对手信息 -->
|
||||
<div class="player-item">
|
||||
<div class="player-info">
|
||||
<div class="player-avatar ai-avatar">🤖</div>
|
||||
<div class="player-details">
|
||||
<div class="player-name">AI对手</div>
|
||||
<div class="player-stats">
|
||||
<div class="stat-item">
|
||||
<span>🎯</span>
|
||||
<span>智能难度</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-status">
|
||||
<div class="status-badge status-waiting">⏳等待</div>
|
||||
<button class="kick-btn" onclick="kickPlayer()">❌</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 底部操作区域 -->
|
||||
<div class="action-area">
|
||||
<button class="start-game-btn" onclick="startGame()">
|
||||
🎮 开始游戏
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 返回上一页
|
||||
function goBack() {
|
||||
console.log('返回上一页');
|
||||
// 添加触觉反馈
|
||||
vibrate();
|
||||
// 实际项目中这里应该调用路由返回或页面跳转
|
||||
}
|
||||
|
||||
|
||||
// 踢出玩家
|
||||
function kickPlayer() {
|
||||
console.log('踢出AI对手');
|
||||
vibrate();
|
||||
|
||||
// 显示确认提示
|
||||
if (confirm('确定要踢出AI对手吗?')) {
|
||||
// 实际项目中这里应该调用踢出玩家的API
|
||||
alert('AI对手已被踢出');
|
||||
}
|
||||
}
|
||||
|
||||
// 开始游戏
|
||||
function startGame() {
|
||||
console.log('开始游戏');
|
||||
vibrate();
|
||||
|
||||
// 检查是否所有玩家都准备
|
||||
alert('游戏即将开始...');
|
||||
// 实际项目中这里应该跳转到游戏页面
|
||||
}
|
||||
|
||||
// 分享房间码
|
||||
function shareRoomCode() {
|
||||
console.log('分享房间码');
|
||||
vibrate();
|
||||
|
||||
// 复制房间码到剪贴板
|
||||
const roomCode = '123456';
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(roomCode).then(() => {
|
||||
showToast('房间码已复制到剪贴板');
|
||||
});
|
||||
} else {
|
||||
// 降级方案
|
||||
showToast('房间码:' + roomCode);
|
||||
}
|
||||
}
|
||||
|
||||
// 触觉反馈
|
||||
function vibrate() {
|
||||
if ('vibrate' in navigator) {
|
||||
navigator.vibrate(10);
|
||||
}
|
||||
document.body.classList.add('haptic-feedback');
|
||||
setTimeout(() => document.body.classList.remove('haptic-feedback'), 100);
|
||||
}
|
||||
|
||||
// 显示提示信息
|
||||
function showToast(message) {
|
||||
// 简单的提示实现
|
||||
const toast = document.createElement('div');
|
||||
toast.textContent = message;
|
||||
toast.style.cssText = `
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
color: white;
|
||||
padding: 12px 20px;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
z-index: 1000;
|
||||
animation: fadeInOut 2s ease;
|
||||
`;
|
||||
|
||||
const style = document.createElement('style');
|
||||
style.textContent = `
|
||||
@keyframes fadeInOut {
|
||||
0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
|
||||
20%, 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
|
||||
100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
|
||||
}
|
||||
`;
|
||||
|
||||
document.head.appendChild(style);
|
||||
document.body.appendChild(toast);
|
||||
|
||||
setTimeout(() => {
|
||||
document.body.removeChild(toast);
|
||||
document.head.removeChild(style);
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// 页面加载完成后的初始化
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
console.log('房间等待页面已加载');
|
||||
|
||||
// 模拟网络状态检查
|
||||
setTimeout(() => {
|
||||
console.log('房间状态同步完成');
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
// 防止页面缩放
|
||||
document.addEventListener('gesturestart', function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// 添加按钮点击反馈
|
||||
document.querySelectorAll('button').forEach(button => {
|
||||
button.addEventListener('click', function() {
|
||||
this.style.transform = 'scale(0.95)';
|
||||
setTimeout(() => {
|
||||
this.style.transform = '';
|
||||
}, 150);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
198
01_文档/原型设计/房间等待页面_线框图方案.md
Normal file
198
01_文档/原型设计/房间等待页面_线框图方案.md
Normal file
@@ -0,0 +1,198 @@
|
||||
# 房间等待页面 - 线框图设计方案
|
||||
|
||||
## 需求分析(更新版)
|
||||
|
||||
### 页面功能
|
||||
- **页面类型**:房间等待页面(我创建的房间)
|
||||
- **核心功能**:显示房间信息,管理对战双方
|
||||
- **默认状态**:房主 vs AI对手
|
||||
|
||||
### 关键元素
|
||||
1. **房间号**:自动生成的6位数字房间码
|
||||
2. **玩家卡片**:显示房主信息(自己)
|
||||
3. **对手卡片**:显示对手信息(默认AI,可踢出)
|
||||
4. **玩家数据**:对战次数、胜率等统计信息
|
||||
5. **管理功能**:踢出对手按钮
|
||||
|
||||
### 简化需求
|
||||
- ❌ 无时间设置
|
||||
- ❌ 无观战功能
|
||||
- ❌ 无其他复杂设置
|
||||
- ✅ 简洁的双人对战等待界面
|
||||
|
||||
## 线框图方案
|
||||
|
||||
### 方案一:上下对称式布局
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ ← 返回 房间 123456 ⚙️ │
|
||||
├─────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌─────────────────────────────┐ │
|
||||
│ │ 👤 张三(房主) │ │
|
||||
│ │ │ │
|
||||
│ │ 🏆 对战次数:156场 │ │
|
||||
│ │ 📊 胜率:68% │ │
|
||||
│ │ ⭐ 等级:黄金III │ │
|
||||
│ │ │ │
|
||||
│ │ [准备完成] │ │
|
||||
│ └─────────────────────────────┘ │
|
||||
│ │
|
||||
│ ⚔️ VS ⚔️ │
|
||||
│ │
|
||||
│ ┌─────────────────────────────┐ │
|
||||
│ │ 🤖 AI对手 │ │
|
||||
│ │ │ │
|
||||
│ │ 🏆 对战次数:∞ │ │
|
||||
│ │ 📊 胜率:45% │ │
|
||||
│ │ ⭐ 等级:匹配中... │ │
|
||||
│ │ │ │
|
||||
│ │ [等待中] [❌踢出对手] │ │
|
||||
│ └─────────────────────────────┘ │
|
||||
│ │
|
||||
│ [开始游戏] │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**特点**:
|
||||
- 优点:对称美观,信息完整
|
||||
- 适合:突出对战双方平等地位
|
||||
- 交互:直观的对战预览
|
||||
|
||||
### 方案二:左右并列式布局
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ ← 返回 房间:123456 📋分享 │
|
||||
├─────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌────────────┐ ┌────────────┐ │
|
||||
│ │ 👤 张三 │ │ 🤖 AI对手 │ │
|
||||
│ │ (房主) │VS │ │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ 对战:156 │ │ 难度:中等 │ │
|
||||
│ │ 胜率:68% │ │ 胜率:45% │ │
|
||||
│ │ 等级:黄金 │ │ 等级:银牌 │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ ✅准备 │ │ ⏳等待 │ │
|
||||
│ └────────────┘ └────────────┘ │
|
||||
│ │
|
||||
│ [❌踢出AI] [🔄换个对手] [⚙️设置] │
|
||||
│ │
|
||||
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
||||
│ │
|
||||
│ [🚀开始对战] │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**特点**:
|
||||
- 优点:信息紧凑,操作集中
|
||||
- 适合:信息密度高的场景
|
||||
- 交互:功能按钮集中在下方
|
||||
|
||||
### 方案三:卡片堆叠式布局
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ 房间 123456 │
|
||||
│ ┌─────────────────┐ │
|
||||
├──────┤ ├────────────┤
|
||||
│ │ [📋复制邀请] │ ← 返回 │
|
||||
│ └─────────────────┘ │
|
||||
│ │
|
||||
│ ┌─👤 房主信息─┐ │
|
||||
│ │ 张三 (LV.15) │ │
|
||||
│ │ ──────────── │ │
|
||||
│ │ 🏆 156场 │ │
|
||||
│ │ 📊 68%胜率 │ │
|
||||
│ │ ✅ 已准备 │ │
|
||||
│ └──────────────┘ │
|
||||
│ │
|
||||
│ ┌─🤖 对手信息─┐ │
|
||||
│ │ AI智能对手 │ │
|
||||
│ │ ──────────── │ │
|
||||
│ │ 🎯 中等难度 │ │
|
||||
│ │ 📊 45%胜率 │ │
|
||||
│ │ ⏳ 匹配中... │ │
|
||||
│ │ │ │
|
||||
│ │ [❌踢出] │ │
|
||||
│ └──────────────┘ │
|
||||
│ │
|
||||
│ ┌─────────────────────────────────┐ │
|
||||
│ │ 🎮 开始游戏 │ │
|
||||
│ └─────────────────────────────────┘ │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**特点**:
|
||||
- 优点:层次清晰,现代感强
|
||||
- 适合:移动端友好设计
|
||||
- 交互:卡片式交互体验
|
||||
|
||||
### 方案四:极简列表式布局
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────┐
|
||||
│ ✕ 房间 123456 │
|
||||
│ │
|
||||
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
||||
│ │
|
||||
│ 👤 张三(房主) │
|
||||
│ 156场 • 68%胜率 • 黄金III ✅准备 │
|
||||
│ │
|
||||
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
||||
│ │
|
||||
│ 🤖 AI对手 │
|
||||
│ 智能难度 • 45%胜率 ❌踢出 │
|
||||
│ │
|
||||
│ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │
|
||||
│ │
|
||||
│ │
|
||||
│ ┌─────────────────────────────────┐ │
|
||||
│ │ 开始游戏 │ │
|
||||
│ └─────────────────────────────────┘ │
|
||||
│ │
|
||||
│ 📋 分享房间码 │
|
||||
└─────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**特点**:
|
||||
- 优点:极简高效,信息清晰
|
||||
- 适合:追求简洁的用户
|
||||
- 交互:最少的视觉干扰
|
||||
|
||||
## 方案对比分析
|
||||
|
||||
| 维度 | 方案一(对称式) | 方案二(并列式) | 方案三(卡片式) | 方案四(列表式) |
|
||||
|------|------------------|------------------|------------------|------------------|
|
||||
| 视觉冲击 | 强 | 中 | 强 | 弱 |
|
||||
| 信息密度 | 中 | 高 | 中 | 高 |
|
||||
| 操作效率 | 中 | 高 | 中 | 高 |
|
||||
| 移动适配 | 好 | 一般 | 很好 | 很好 |
|
||||
| 现代感 | 中 | 中 | 强 | 强 |
|
||||
|
||||
## 推荐选择
|
||||
|
||||
基于移动端打飞机游戏的特点,推荐:
|
||||
|
||||
1. **首选方案三**:卡片堆叠式 - 现代感强,移动端友好
|
||||
2. **备选方案四**:极简列表式 - 信息清晰,操作高效
|
||||
|
||||
## 设计要点
|
||||
|
||||
### 关键信息层级
|
||||
1. **房间号** - 顶部显著位置
|
||||
2. **玩家状态** - 准备状态最重要
|
||||
3. **统计数据** - 次要信息,简化显示
|
||||
4. **操作按钮** - 底部固定,易于触达
|
||||
|
||||
### 交互考虑
|
||||
- **踢出对手**:确认提示防误操作
|
||||
- **开始游戏**:双方准备后才可点击
|
||||
- **分享房间**:便于邀请真人玩家
|
||||
|
||||
---
|
||||
**设计师**: prototype-designer
|
||||
**创建时间**: 2025-09-11
|
||||
**状态**: 待用户确认方案选择
|
||||
@@ -62,7 +62,6 @@ interface Achievement {
|
||||
**功能列表**:
|
||||
- 微信登录/游客登录
|
||||
- 用户资料管理(头像、昵称)
|
||||
- 等级系统(经验值积累)
|
||||
- 成就系统(解锁条件和奖励)
|
||||
- 好友系统(添加、删除、邀请对战)
|
||||
- 排行榜(全服排名、好友排名)
|
||||
@@ -273,7 +272,6 @@ enum MessageType {
|
||||
主界面
|
||||
├── 头部导航
|
||||
│ ├── 用户头像+昵称
|
||||
│ ├── 等级显示
|
||||
│ └── 设置按钮
|
||||
├── 游戏模式选择
|
||||
│ ├── AI对战
|
||||
|
||||
Reference in New Issue
Block a user