Skip to content

Commit

Permalink
1.首次制作空的游戏模板文件夹tempz
Browse files Browse the repository at this point in the history
2.展示Demo的文件名称更新,规范
3.Dialog新增API Dialog.useDefaultStyle(bool)是否使用默认的样式
4.细节更新
  • Loading branch information
2439905184 committed Feb 6, 2021
1 parent e8bc3bd commit f98d1a8
Show file tree
Hide file tree
Showing 40 changed files with 171 additions and 225 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
EasyAvgFrameWork.zip
EasyAvgFrameWork.zip
/bin
/tempz
Binary file removed EasyAvgFrameWork_0.2.3.zip
Binary file not shown.
1 change: 0 additions & 1 deletion es6/a

This file was deleted.

1 change: 1 addition & 0 deletions es6/tip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// TODO:使用ES6语法编写
32 changes: 0 additions & 32 deletions fullExample/Load.html

This file was deleted.

12 changes: 5 additions & 7 deletions fullExample/save.html → fullExample/Load_and_Save.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
<link rel="stylesheet" href="css/save.css">
<link rel="stylesheet" href="css/button.css">
<!--框架运行强制依赖js插件-->
<!--<script src="jQuery_main.js"></script>-->
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>

<script src="../module/changeScene.js"></script>
<script src="../module/FileSystem.js"></script>
<script src="SaveLogic.js"></script>
<script src="Load_and_Save.js"></script>
<!-- <link rel="stylesheet" href="css/bgm.css"> -->
</head>
<body>
<!-- NOTE: 现在存档和读档功能合并在一个页面了 -->
<audio id="bgm" src="bgm/i71004_fresh.ogg" controls="true" loop="true" >你的浏览器不支持audio,快点换新的浏览器吧 </audio>
<audio id="se" src="sound/s01.wav" controls> </audio>
<!-- bgm和滑动音效 -->
<audio id="bgm" src="" controls="true" loop="true" >你的浏览器不支持audio,快点换新的浏览器吧 </audio>
<audio id="se" src="" controls> </audio>
<h2>存档与读档,请点击下面的列表存档,输入数值读档</h2>
<img src="img/mini_menu_save.jpg">
<img src="a" alt="一个存档和读档UI图片">
<ol id="saveList">
<!-- 改用动态创建 -->
<li value="1"><img width="5%">No Data</li>
Expand All @@ -42,6 +41,5 @@ <h2 style="color:red">注意,第十个存档槽存在bug,请不要在这里
<button id="loadGame">读档</button>
<button id="reset">清空所有存档</button>
<button id="back">返回</button>

</body>
</html>
File renamed without changes.
33 changes: 33 additions & 0 deletions fullExample/MainMenu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>完整项目展示</title>
<!--框架运行强制依赖js插件-->
<!--<script src="jQuery_main.js"></script>-->
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="../module/core.js"></script>
<script src="../module/FileSystem.js"></script>
<script src="../module/changeScene.js"></script>
<script src="../module/ImageEffect.js"></script>
<!-- 用户代码 -->
<script src="MainMenu.js"></script>
<!-- css -->
<link rel="stylesheet" href="css/button.css">
<link rel="stylesheet" href="css/bgm.css">
</head>
<body>
<h1 align="center">请点击图片来播放游戏背景音乐</h1>
<h2 align="center">建议把浏览器自动播放音乐权限打开,以更好的体验此Demo</h2>
<img src="img/n01.jpg" id="bg" alt="no1">
<button id="newGame">新游戏</button>
<button id="loadGame">读取</button>
<button id="dev">开发室</button>
<button id="free">免费声明</button>
<button id="exit">终了</button>
<button id="ModuleTest">单元测试</button>
<audio id="btn_sound" src="sound/s01.wav" controls="true" ></audio>
<audio id="bgm" src="bgm/i72015_scenery_of_spring.ogg" controls="true" loop="true"></audio>
</body>
</html>
4 changes: 2 additions & 2 deletions fullExample/Logic.js → fullExample/MainMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $(function()
$("#loadGame").click(function()
{
alert("加载游戏")
changeScene("save.html")
changeScene("Load_and_Save.html")
})
$("#dev").click(function()
{
Expand All @@ -55,7 +55,7 @@ $(function()
alert("感谢游玩此游戏!")
$("#bgm")[0].pause()
$("#bgm")[0].load()
changeScene("splash.html")
changeScene("index.html")
})
$("#ModuleTest").click(function()
{
Expand Down
10 changes: 4 additions & 6 deletions fullExample/Scene/Game.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script src="../../module/changeScene.js"></script>
<script src="../../module/ImageEffect.js"></script>
<script src="../../module/PlotLoader.js"></script>
<script src="Logic.js"></script>
<script src="InitGame.js"></script>
<!--内置button样式,如果不喜欢,可以自己建立css样式-->
<link rel="stylesheet" href="../css/button.css">
<link rel="stylesheet" href="../css/bgm.css">
Expand All @@ -25,15 +25,13 @@ <h1> EasyAvgFramework </h1>
<button id="end">返回</button>
<button id="loadGame">读档</button>
<button id="saveGame">存档</button>
<!-- <button id="clearCookie">清除自动暂存cookie</button> -->
<button id="clearClicks">清空计数器</button>
<button id="reload">刷新页面</button>
<button id="history">历史记录</button>
<button id="hideDialog">隐藏对话框</button>
<button id="clearAll">清空localStorage</button>
<ol id="HistoryPanel" style="display:none">
<!-- <p class="historyView">【小夜美】测试2</p> -->
</ol>
<button id="clearAll">清空所有localStorage</button>
<sapn>开发游戏时,请删除这个防止玩家乱点</span>
<ol id="HistoryPanel" style="display:none"></ol>
<h6> Copyright © 2020 小沙盒工作室&128hh. </h6>
</body>
</html>
19 changes: 8 additions & 11 deletions fullExample/Scene/Logic.js → fullExample/Scene/InitGame.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $(function()
})
$("#loadGame").click(function()
{
changeScene("../save.html")
changeScene("../Load_and_Save.html")
})
$("#clearCookie").click(function()
{
Expand Down Expand Up @@ -62,7 +62,7 @@ $(function()
var dialog=Engine.create_Dialog()
//全局人物对象 可以自由更改参数和变量名
window.koyomi=Engine.create_img("../img/char.png","小夜美")
//设置人物位置
//设置人物位置 参数可更改
koyomi.css("margin-left","500px")
koyomi.css("margin-top","20px")
koyomi.css("position","relative")
Expand All @@ -71,15 +71,16 @@ $(function()
alert("点我干涉么,溜了..")
koyomi.animate({right:'250px',opacity:'0.5'})
})
//初始化剧情
//开启调试信息
dialog.setDebugLog(true)
dialog.useDefaultStyle(true) //是否使用默认样式
//创建背景图片
Engine.create_BackroundImg(bg)
//添加ui
$("body").append(bg)
$("body").append(koyomi)
$("body").append(dialog)
//初始化剧情
// NOTE: 从文本文件读取剧情 此步骤由剧情加载器完成,不应该人为干涉
/*如果存在存档优先加载*/
function initPlot()
Expand All @@ -94,7 +95,7 @@ if(t_data)
{ //信息分离 //章节 和句子进度
var chapterIndex=t_data.split("_")[0]
var lineIndex=t_data.split("_")[1]
alert("存在进度,自动恢复")
console.warn("存在进度,自动恢复")
console.log("#游戏进度_>_"+t_data)
// NOTE: 从指定的位置加载剧情
var dataObj=PlotLoader.load_from(chapterIndex,lineIndex)
Expand All @@ -104,27 +105,23 @@ if(t_data)
}
else
{
alert("#不存在进度,从头开始读文件")
console.clear()
console.log("#不存在进度,从头开始读文件")
initPlot()
}
// 存档按钮
$("#saveGame").click(function()
{
console.warn("##存档!");
//在跳转存档页面之前,先暂存游戏运行状态执行到哪一个句子的index
// var clicks=dialog.getClicks()
var RunTimeIndex=dialog.getRuntimeIndex()
console.warn("#运行到哪个章节哪句话");
console.log(RunTimeIndex);
file.save("RunTimeIndex",RunTimeIndex)
// console.warn("#存档数据");
//当缓存完成之后跳转
if(file.load("RunTimeIndex")!=null)
{
changeScene("../save.html")
changeScene("../Load_and_Save.html")
}
// console.log();
})

// bindingButtonAction(dialog)
})
25 changes: 0 additions & 25 deletions fullExample/Splash.html

This file was deleted.

4 changes: 0 additions & 4 deletions fullExample/chapterTest/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ var end=function()
alert("代码运行到了结尾")
}
dialog.setFinishAction(end)
//console.warn("#获得object的所有属性");

// console.log(typeof(chapter1));
// print_obj_things(chapter1)
})
5 changes: 5 additions & 0 deletions fullExample/css/auto_wait.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/* 等待玩家点击时的css */
p{
@keyframe

}
1 change: 1 addition & 0 deletions fullExample/css/button.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*默认按钮样式*/
button
{
background: orange;
Expand Down
2 changes: 0 additions & 2 deletions fullExample/css/cover.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@
#bg
{
/* -webkit-mask: */


}
23 changes: 0 additions & 23 deletions fullExample/css/transition.css

This file was deleted.

1 change: 1 addition & 0 deletions fullExample/favicon.ico.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
网站图片便签页缩略图
Binary file added fullExample/img/EasyAvg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 20 additions & 24 deletions fullExample/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,29 @@
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>完整项目展示</title>
<!--框架运行强制依赖js插件-->
<!--<script src="jQuery_main.js"></script>-->
<title>默认启动页面</title>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script src="../module/core.js"></script>
<script src="../module/FileSystem.js"></script>
<script src="../module/changeScene.js"></script>
<script src="../module/ImageEffect.js"></script>
<!-- 用户代码 -->
<script src="Logic.js"></script>
<!-- css -->
<link rel="stylesheet" href="css/button.css">
<link rel="stylesheet" href="css/bgm.css">
<link rel="stylesheet" href="css/imgDefult.css">
<!-- <link rel="stylesheet" href="css/splash.css"> -->
</head>
<body>
<h1 align="center">请点击图片来播放游戏背景音乐</h1>
<h2 align="center">建议把浏览器自动播放音乐权限打开,以更好的体验此Demo</h2>
<img src="img/n01.jpg" id="bg" alt="no1">
<button id="newGame">新游戏</button>
<button id="loadGame">读取</button>
<button id="dev">开发室</button>
<button id="free">免费声明</button>
<button id="exit">终了</button>
<button id="ModuleTest">单元测试</button>
<audio id="btn_sound" src="sound/s01.wav" controls="true" ></audio>
<audio id="bgm" src="bgm/i72015_scenery_of_spring.ogg" controls="true" loop="true"></audio>
<audio id="se" src="sound/s03.mp3"> </audio>
<h1 align="center" style="display:none">EasyAvgFrameWork</h1>

<img id="Logo" src="img/EasyAvg.png" alt="EasyAvg的Logo">

<script>
$(function()
{
$("#se")[0].play()
$("#Logo").css("margin-left","650px")
$("#Logo").css("height","200px")
$("h1").fadeIn(2500,function()
{
// alert("加载游戏主页")
changeScene("MainMenu.html")
})
})
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions fullExample/tip.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
此Demo一般用于开发测试和展示,所以和module文件夹是分开的。
如要进行游戏开发,请下载游戏模板,把路径整合完毕了
1 change: 1 addition & 0 deletions module/Animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function AnimateEffect()
this.shake="shake"
this.move_to_left="move_to_left"
this.move_to_right="move_to_right"
//以下代码仅在initGame.js中测试成功 在chapterScript还没测试过
this.setAnimate=function(obj,effect)
{
if(effect=="move_to_left")
Expand Down
Loading

0 comments on commit f98d1a8

Please sign in to comment.