From 9a53bf1843c712bea9b4af19fb85f5cabf039973 Mon Sep 17 00:00:00 2001 From: LingASDJ <2735951230@qq.com> Date: Fri, 31 Mar 2023 09:28:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4Vue=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=EF=BC=8C=E7=BB=A7=E7=BB=AD=E4=BD=BF=E7=94=A8=E6=97=A0=E6=A0=B9?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/index.html | 26 -------------------------- docs/unit_code/1.15/code.md | 23 ++++++++++++++++------- 2 files changed, 16 insertions(+), 33 deletions(-) diff --git a/docs/index.html b/docs/index.html index 381737f..d5fcbb8 100644 --- a/docs/index.html +++ b/docs/index.html @@ -232,22 +232,6 @@ } ) ], - vueGlobalOptions: { - data: function () { - return { - count: 0, - //文本索引 - borrowResourcesWhileAlive: '#参考答案为:\n[core]\nborrowResourcesWhileAlive:5000\nenergyMax:1\nenergyRegen:-0.4\ndieOnZeroEnergy:true\n#原理是通过能量为0单位死亡并通过这个代码还钱,是很简陋的贷款思路,当然,在后续会有更加高级的思路。' - }; - }, - // 请参考方法调用 - methods: { - borrowResourcesWhileAlivequestion() { - // 参考方法进行调用,this.xxxx 与上面一致。 - document.getElementById("borrowResourcesWhileAlivequestionOK").innerText = this.borrowResourcesWhileAlive; - }, - }, - }, tabs: { persist: true, // default sync: true, // default @@ -352,16 +336,6 @@ - - - - - - - - - - diff --git a/docs/unit_code/1.15/code.md b/docs/unit_code/1.15/code.md index 5432827..2e7c200 100644 --- a/docs/unit_code/1.15/code.md +++ b/docs/unit_code/1.15/code.md @@ -404,19 +404,28 @@ armourMinDamageToKeep:2 borrowResourcesWhileAlive:5000 #单位活着的时候给予5000金币,死亡扣除5000金币 #一个小型贷款系统, +``` -### 考考你: -如果这里要通过这个代码做一个小的贷款系统,并经过一段时间让单位死亡。 + + + +#### **动动脑,考考你** +如果这里要通过这个代码做一个小的贷款系统,并经过一段时间让单位死亡。 只需要4行代码即可实现,试试看。 提示:dieOnZeroEnergy:true---(无能量时死亡|如果能量值为零,该单位死亡) +#### **显示参考答案** +```txt +#参考答案为: +[core] +borrowResourcesWhileAlive:5000 +energyMax:1 +energyRegen:-0.4 +dieOnZeroEnergy:true +#原理是通过能量为0单位死亡并通过这个代码还钱,是很简陋的贷款思路,当然,在后续会有更加高级的思路。 ``` - - - -

 

- + ## **[canBuild_Name]组**