From a7660e51434e615064fc8cb364698a0fe185d03c Mon Sep 17 00:00:00 2001 From: hanxi Date: Thu, 28 Mar 2024 09:29:32 +0000 Subject: [PATCH] Publish --- p/35/index.html | 2 +- p/44/index.html | 16 ++++++++-------- p/90/index.html | 4 ++-- p/93/index.html | 5 ++++- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/p/35/index.html b/p/35/index.html index 6e90bc5..883e295 100644 --- a/p/35/index.html +++ b/p/35/index.html @@ -37,7 +37,7 @@ // 判断是不是ios端 function isOS() { - return navigator.userAgent.match(/ipad|iphone/i); + return navigator.userAgent.match(/ipad|iphone/i); } //创建文本元素 function createTextArea(text) { diff --git a/p/44/index.html b/p/44/index.html index ca4d277..e2aa45a 100644 --- a/p/44/index.html +++ b/p/44/index.html @@ -69,14 +69,14 @@

20200206更新:
上面走了点弯路,用下面的 tampermonkey 脚本方法更方便。

// ==UserScript==
-// @name         bridge.51zhy.cn
-// @namespace    http://tampermonkey.net/
-// @version      0.1
-// @grant    GM_xmlhttpRequest
-// @description  try to take over the world!
-// @author       You
-// @match        yd.51zhy.cn/*
-// @grant    GM_setClipboard
+// @name         bridge.51zhy.cn
+// @namespace    http://tampermonkey.net/
+// @version      0.1
+// @grant    GM_xmlhttpRequest
+// @description  try to take over the world!
+// @author       You
+// @match        yd.51zhy.cn/*
+// @grant    GM_setClipboard
 // ==/UserScript==
 
 let allText = {};
diff --git a/p/90/index.html b/p/90/index.html
index 4395a8e..764079e 100644
--- a/p/90/index.html
+++ b/p/90/index.html
@@ -552,9 +552,9 @@ 

再设计一下文件目录结构

dirty_gen -tmpl=dirty_tmpl/wanfa1.tmpl -out=dirty_out/wanfa1.go dirty_gen -tmpl=dirty_tmpl/wanfa2.tmpl -out=dirty_out/wanfa2.go

其他地方使用可以这样:

-
import dirty_out
+
import dirty_out
 
-dirty_out.NewXXX()
+dirty_out.NewXXX()
 

进展:目前就差实现 dirty_gen 程序了,初版的 dirty_gen.go 如下:

package main
diff --git a/p/93/index.html b/p/93/index.html
index 528b32c..dab7323 100644
--- a/p/93/index.html
+++ b/p/93/index.html
@@ -85,7 +85,6 @@
 

已经完成了 schema.lua 的基础结构格式: https://github.com/hanxi/lua-dirty-mongo/blob/main/schema.lua

目前只有表和子表结构,未来有空再加上 array , map 。最后再加上从 proto3 自动生成就算结束了。

-

TODO:


最终的开发游戏逻辑的效果应该是这样的:

    @@ -94,6 +93,10 @@

在框架层面做好数据的加载和写入,比如首次访问数据直接从 MongoDB 里加载完整数据,然后用 dirtydoc 包裹起来给到玩法逻辑,玩法逻辑操作 dirtydoc 对象,框架每 5 分钟定时检查 dirtydoc 是否有差异,有差异就把差异写入 MongoDB。

这样写玩法逻辑就不用关心数据是怎么从数据库中加载出来的和落地的。

+
+
    +
  • 20240328 更新:已加上 array 和 map,并支持从 proto3 文件生成 schema.lua 文件
  • +