Deploying to gh-pages from @ LingASDJ/RW-API-Code@3d9cf6aa07 🚀
This commit is contained in:
parent
2f43504c76
commit
077f72569c
|
@ -6,7 +6,7 @@
|
|||
<title>Runtime API Examples | RW-API_Code</title>
|
||||
<meta name="description" content="Easy Code">
|
||||
<link rel="preload stylesheet" href="/assets/style.0fe59653.css" as="style">
|
||||
<script type="module" src="/assets/app.0cd90b67.js"></script>
|
||||
<script type="module" src="/assets/app.b9accf65.js"></script>
|
||||
<link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="modulepreload" href="/assets/chunks/framework.afbd7175.js">
|
||||
<link rel="modulepreload" href="/assets/chunks/theme.a458785b.js">
|
||||
|
@ -100,7 +100,7 @@
|
|||
}</pre><h3 id="page-frontmatter" tabindex="-1">Page Frontmatter <a class="header-anchor" href="#page-frontmatter" aria-label="Permalink to "Page Frontmatter""></a></h3><pre>{
|
||||
"outline": "deep"
|
||||
}</pre><h2 id="more" tabindex="-1">More <a class="header-anchor" href="#more" aria-label="Permalink to "More""></a></h2><p>Check out the documentation for the <a href="https://vitepress.dev/reference/runtime-api#usedata" target="_blank" rel="noreferrer">full list of runtime APIs</a>.</p></div></div></main><footer class="VPDocFooter" data-v-c4b0d3cf data-v-face870a><!--[--><!--]--><!----><div class="prev-next" data-v-face870a><div class="pager" data-v-face870a><!----></div><div class="pager" data-v-face870a><a class="pager-link next" href="/markdown-examples" data-v-face870a><span class="desc" data-v-face870a>下一篇文章</span><span class="title" data-v-face870a>主页-Home</span></a></div></div></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-b2cf3e0b data-v-2f86ebd2><div class="container" data-v-2f86ebd2><p class="message" data-v-2f86ebd2>Rosy-Code Ling Web Stuido</p><p class="copyright" data-v-2f86ebd2>Copyright © 2023-RW-API-Code</p></div></footer><!--[--><!--]--></div></div>
|
||||
<script>__VP_HASH_MAP__ = JSON.parse("{\"src_unit_graphics.md\":\"11d4f4e2\",\"src_unit_loginboolean.md\":\"f52077c2\",\"markdown-examples.md\":\"effb3764\",\"index.md\":\"3f0b856d\",\"src_map_tsada.md\":\"124b9478\",\"src_unit_canbuild.md\":\"a704448b\",\"src_unit_core.md\":\"b42203f0\",\"src_debug_test.md\":\"374e13c1\",\"api-examples.md\":\"cd86cd6d\"}")
|
||||
<script>__VP_HASH_MAP__ = JSON.parse("{\"index.md\":\"3f0b856d\",\"src_debug_test.md\":\"374e13c1\",\"api-examples.md\":\"cd86cd6d\",\"markdown-examples.md\":\"effb3764\",\"src_map_tsada.md\":\"124b9478\",\"src_unit_canbuild.md\":\"a704448b\",\"src_unit_core.md\":\"e90f9199\",\"src_unit_graphics.md\":\"11d4f4e2\",\"src_unit_loginboolean.md\":\"d8c936e3\"}")
|
||||
__VP_SITE_DATA__ = JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"RW-API_Code\",\"description\":\"Easy Code\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"主页\",\"link\":\"/\"},{\"text\":\"单位API\",\"link\":\"/src/Unit/core\"},{\"text\":\"地图API\",\"link\":\"/src/Map/teada\"},{\"text\":\"调试API\",\"link\":\"/src/Debug/test\"},{\"text\":\"开发指南\",\"link\":\"/DEV\"}],\"docFooter\":{\"prev\":\"上一篇文章\",\"next\":\"下一篇文章\"},\"sidebar\":[{\"text\":\"RW-API-Code\",\"items\":[{\"text\":\"主页-Home\",\"link\":\"/markdown-examples\"},{\"text\":\"核心-CORE\",\"link\":\"/src/Unit/core\"},{\"text\":\"可建造-CORE\",\"link\":\"/src/Unit/canbuild\"},{\"text\":\"逻辑组-LogicBoolean\",\"link\":\"/src/Unit/loginboolean\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/vuejs/vitepress\"}],\"footer\":{\"message\":\"Rosy-Code Ling Web Stuido\",\"copyright\":\"Copyright © 2023-RW-API-Code\"}},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":true}")</script>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
import{d as p,I as s,a1 as i,u,h as c,l,a2 as d,a3 as f,a4 as m,a5 as h,a6 as A,a7 as g,a8 as P,a9 as v,aa as y,ab as C,ac as w,ad as _,ae as b,af as E}from"./chunks/framework.afbd7175.js";import{t as R}from"./chunks/theme.a458785b.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(R),D=p({name:"VitePressApp",setup(){const{site:e}=u();return c(()=>{l(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),d(),f(),m(),n.setup&&n.setup(),()=>h(n.Layout)}});async function O(){const e=T(),a=S();a.provide(A,e);const t=g(e.route);return a.provide(P,t),a.component("Content",v),a.component("ClientOnly",y),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:C}),{app:a,router:e,data:t}}function S(){return w(D)}function T(){let e=s,a;return _(t=>{let o=b(t);return e&&(a=o),(e||a===o)&&(o=o.replace(/\.js$/,".lean.js")),s&&(e=!1),E(()=>import(o),[])},n.NotFound)}s&&O().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{O as createApp};
|
1
assets/app.b9accf65.js
Normal file
1
assets/app.b9accf65.js
Normal file
|
@ -0,0 +1 @@
|
|||
import{d as l,I as s,a1 as u,u as d,h as m,l as f,a2 as g,a3 as h,a4 as y,a5 as A,a6 as v,a7 as w,a8 as C,a9 as P,aa as E,ab as b,ac as D,ad as S,ae as T,af as _}from"./chunks/framework.afbd7175.js";import{t as x}from"./chunks/theme.a458785b.js";function R(e){return new Promise(t=>setTimeout(t,e))}async function L(){try{await R(1e3),console.log("timeout");const e=document.getElementsByClassName("copy");console.log(e),console.log(e.length);for(let t=0;t<e.length;t++){const n=e[t];n.addEventListener("click",()=>{const c=[...n.parentNode.querySelector("code").querySelectorAll("span")],r=[...new Set(c.map(p=>p.textContent))].join("");navigator.clipboard.writeText(r),console.log(r)})}}catch(e){console.error(e)}}L();function i(e){if(e.extends){const t=i(e.extends);return{...t,...e,async enhanceApp(n){t.enhanceApp&&await t.enhanceApp(n),e.enhanceApp&&await e.enhanceApp(n)}}}return e}const o=i(x),j=l({name:"VitePressApp",setup(){const{site:e}=d();return m(()=>{f(()=>{document.documentElement.lang=e.value.lang,document.documentElement.dir=e.value.dir})}),g(),h(),y(),o.setup&&o.setup(),()=>A(o.Layout)}});async function O(){const e=F(),t=B();t.provide(v,e);const n=w(e.route);return t.provide(C,n),t.component("Content",P),t.component("ClientOnly",E),Object.defineProperties(t.config.globalProperties,{$frontmatter:{get(){return n.frontmatter.value}},$params:{get(){return n.page.value.params}}}),o.enhanceApp&&await o.enhanceApp({app:t,router:e,siteData:b}),{app:t,router:e,data:n}}function B(){return D(j)}function F(){let e=s,t;return S(n=>{let a=T(n);return e&&(t=a),(e||t===a)&&(a=a.replace(/\.js$/,".lean.js")),s&&(e=!1),_(()=>import(a),[])},o.NotFound)}s&&O().then(({app:e,router:t,data:n})=>{t.go().then(()=>{u(t.route,n.site),e.mount("#app")})});export{O as createApp};
|
|
@ -1,4 +1,4 @@
|
|||
import{_ as t,o,c as r,x as e,a,C as l,z as n,N as i,D as c}from"./chunks/framework.afbd7175.js";const S=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i(`<h1 id="core-组" tabindex="-1"><strong>[core]组</strong> <a class="header-anchor" href="#core-组" aria-label="Permalink to "**[core]组**""></a></h1><h2 id="第一类-通用代码组" tabindex="-1">第一类-通用代码组 <a class="header-anchor" href="#第一类-通用代码组" aria-label="Permalink to "第一类-通用代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>以下的代码为<code>通用代码</code>,多半是必要的代码,如果不包括这些,可能在<code>绝大多数情况下导致错误</code>。</p></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组</p><h4 id="name-要点指示" tabindex="-1">name-要点指示 <a class="header-anchor" href="#name-要点指示" aria-label="Permalink to "name-要点指示""></a></h4><hr><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-m1pI-" id="tab-MViNi4I" checked="checked"><label for="tab-MViNi4I">JDSALing</label><input type="radio" name="group-m1pI-" id="tab-EVlb05h"><label for="tab-EVlb05h">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">定义单位原始名称,可以是中文。</span></span>
|
||||
import{_ as t,o,c as r,x as e,a,C as l,z as n,N as i,D as c}from"./chunks/framework.afbd7175.js";const S=JSON.parse('{"title":"[core]组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/core.md"}'),p={name:"src/Unit/core.md"},d=i(`<h1 id="core-组" tabindex="-1"><strong>[core]组</strong> <a class="header-anchor" href="#core-组" aria-label="Permalink to "**[core]组**""></a></h1><h2 id="第一类-通用代码组" tabindex="-1">第一类-通用代码组 <a class="header-anchor" href="#第一类-通用代码组" aria-label="Permalink to "第一类-通用代码组""></a></h2><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>以下的代码为<code>通用代码</code>,多半是必要的代码,如果不包括这些,可能在<code>绝大多数情况下导致错误</code>。</p></div><h3 id="name" tabindex="-1">name <a class="header-anchor" href="#name" aria-label="Permalink to "name""></a></h3><h4 id="name-代码简介" tabindex="-1">name-代码简介 <a class="header-anchor" href="#name-代码简介" aria-label="Permalink to "name-代码简介""></a></h4><p>代码:name 中文释义:名字 类型:字符型 隶属于:通用代码组</p><h4 id="name-要点指示" tabindex="-1">name-要点指示 <a class="header-anchor" href="#name-要点指示" aria-label="Permalink to "name-要点指示""></a></h4><hr><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-ZLA4J" id="tab-SAFUTix" checked="checked"><label for="tab-SAFUTix">JDSALing</label><input type="radio" name="group-ZLA4J" id="tab-P5kLqMX"><label for="tab-P5kLqMX">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">定义单位原始名称,可以是中文。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">游戏使用它区分其它单位。</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">如果没有在[displayText或者语言文件设置显示名称</span><span style="color:#A6ACCD;">],</span></span>
|
||||
|
@ -17,13 +17,13 @@ import{_ as t,o,c as r,x as e,a,C as l,z as n,N as i,D as c}from"./chunks/framew
|
|||
<span class="line"><span style="color:#A6ACCD;">displayText_zh:中文标题</span></span>
|
||||
<span class="line"></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription: -English Description</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription_zh:-中文描述</span></span></code></pre></div><hr><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义:价格 类型:整数 隶属于:通用代码组</p><h4 id="price-要点指示" tabindex="-1">price-要点指示 <a class="header-anchor" href="#price-要点指示" aria-label="Permalink to "price-要点指示""></a></h4><p>定义单位的价格,显示在单位信息中,建造时也以此价格为准。</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-UKxBE" id="tab-O9hF2ZX" checked="checked"><label for="tab-O9hF2ZX">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">默认情况下,price只需要填写一个整数,此时使用的是游戏内自带的资金credit;</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">displayDescription_zh:-中文描述</span></span></code></pre></div><hr><h3 id="price" tabindex="-1">price <a class="header-anchor" href="#price" aria-label="Permalink to "price""></a></h3><h4 id="price-代码简介" tabindex="-1">price-代码简介 <a class="header-anchor" href="#price-代码简介" aria-label="Permalink to "price-代码简介""></a></h4><p>代码:price 中文释义:价格 类型:整数 隶属于:通用代码组</p><h4 id="price-要点指示" tabindex="-1">price-要点指示 <a class="header-anchor" href="#price-要点指示" aria-label="Permalink to "price-要点指示""></a></h4><p>定义单位的价格,显示在单位信息中,建造时也以此价格为准。</p><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-AmnYa" id="tab-7uRHmE7" checked="checked"><label for="tab-7uRHmE7">Tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">默认情况下,price只需要填写一个整数,此时使用的是游戏内自带的资金credit;</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">想要更改资源类型,可以使用:</span></span>
|
||||
<span class="line"><span style="color:#89DDFF;">\`</span><span style="color:#FFCB6B;">price:资源1=数值1,资源2=数值2,资源3=数值3,……</span><span style="color:#89DDFF;">\`</span><span style="color:#A6ACCD;"> </span><span style="color:#FFCB6B;">的格式</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">(前提是此资源要在使用的单位进行定义)。</span></span></code></pre></div></div></div><h4 id="price-演示例子" tabindex="-1">price-演示例子 <a class="header-anchor" href="#price-演示例子" aria-label="Permalink to "price-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">price:120,石油=80,铁=60</span></span></code></pre></div><hr><h3 id="radius" tabindex="-1">radius <a class="header-anchor" href="#radius" aria-label="Permalink to "radius""></a></h3><h4 id="radius-代码简介" tabindex="-1">radius-代码简介 <a class="header-anchor" href="#radius-代码简介" aria-label="Permalink to "radius-代码简介""></a></h4><p>代码:radius 中文释义:半径 类型:整数 隶属于:通用代码组</p><h4 id="radius-要点指示" tabindex="-1">radius-要点指示 <a class="header-anchor" href="#radius-要点指示" aria-label="Permalink to "radius-要点指示""></a></h4><p>半径定义单位的<code>实际碰撞体积和显示范围</code>,在未设置<code>选择框大小</code>时,半径决定是单位选择框的大小。 半径的单位是像素(px)。</p><h4 id="radius-演示例子" tabindex="-1">radius-演示例子 <a class="header-anchor" href="#radius-演示例子" aria-label="Permalink to "radius-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">radius:20</span></span></code></pre></div><hr><h3 id="mass" tabindex="-1">mass <a class="header-anchor" href="#mass" aria-label="Permalink to "mass""></a></h3><h4 id="mass-代码简介" tabindex="-1">mass-代码简介 <a class="header-anchor" href="#mass-代码简介" aria-label="Permalink to "mass-代码简介""></a></h4><p>代码:mass 中文释义:质量 类型:整数 隶属于:通用代码组</p><h4 id="mass-要点指示" tabindex="-1">mass-要点指示 <a class="header-anchor" href="#mass-要点指示" aria-label="Permalink to "mass-要点指示""></a></h4><p>质量决定单位在各种碰撞时的效果。<code>质量越大,其他单位越难推动</code>。</p><h4 id="mass-演示例子" tabindex="-1">mass-演示例子 <a class="header-anchor" href="#mass-演示例子" aria-label="Permalink to "mass-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">mass:2000</span></span></code></pre></div><hr><h3 id="maxhp" tabindex="-1">maxHp <a class="header-anchor" href="#maxhp" aria-label="Permalink to "maxHp""></a></h3><h4 id="maxhp-代码简介" tabindex="-1">maxHp-代码简介 <a class="header-anchor" href="#maxhp-代码简介" aria-label="Permalink to "maxHp-代码简介""></a></h4><p>代码:maxHp 中文释义:最大生命值 类型:整数 隶属于:通用代码组</p><h4 id="maxhp-要点指示" tabindex="-1">maxHp-要点指示 <a class="header-anchor" href="#maxhp-要点指示" aria-label="Permalink to "maxHp-要点指示""></a></h4><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-ANp-A" id="tab-nmi18vt" checked="checked"><label for="tab-nmi18vt">tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">最大生命值定义单位在不修改它时最多能够有多少血量,</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">mass:2000</span></span></code></pre></div><hr><h3 id="maxhp" tabindex="-1">maxHp <a class="header-anchor" href="#maxhp" aria-label="Permalink to "maxHp""></a></h3><h4 id="maxhp-代码简介" tabindex="-1">maxHp-代码简介 <a class="header-anchor" href="#maxhp-代码简介" aria-label="Permalink to "maxHp-代码简介""></a></h4><p>代码:maxHp 中文释义:最大生命值 类型:整数 隶属于:通用代码组</p><h4 id="maxhp-要点指示" tabindex="-1">maxHp-要点指示 <a class="header-anchor" href="#maxhp-要点指示" aria-label="Permalink to "maxHp-要点指示""></a></h4><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-RUKIu" id="tab-0dDQpm3" checked="checked"><label for="tab-0dDQpm3">tobby3600</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">最大生命值定义单位在不修改它时最多能够有多少血量,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">单位默认生成时即是这个血量。</span></span>
|
||||
<span class="line"><span style="color:#82AAFF;">maxHp可以通过单位参考.maxHp</span><span style="color:#89DDFF;">()</span><span style="color:#A6ACCD;">来获取,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">也可以通过[action</span><span style="color:#A6ACCD;">]进行修改。</span></span></code></pre></div></div></div><h4 id="maxhp-演示例子" tabindex="-1">maxHp-演示例子 <a class="header-anchor" href="#maxhp-演示例子" aria-label="Permalink to "maxHp-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
|
@ -62,7 +62,7 @@ import{_ as t,o,c as r,x as e,a,C as l,z as n,N as i,D as c}from"./chunks/framew
|
|||
<span class="line"><span style="color:#676E95;font-style:italic;">#如果受到40以下的常规攻击,则进行最低伤害判定</span></span></code></pre></div><hr><h3 id="borrowresourceswhilealive" tabindex="-1">borrowResourcesWhileAlive <a class="header-anchor" href="#borrowresourceswhilealive" aria-label="Permalink to "borrowResourcesWhileAlive""></a></h3><h4 id="borrowresourceswhilealive-代码简介" tabindex="-1">borrowResourcesWhileAlive-代码简介 <a class="header-anchor" href="#borrowresourceswhilealive-代码简介" aria-label="Permalink to "borrowResourcesWhileAlive-代码简介""></a></h4><p>代码:armour 中文释义:资源活着时借用 类型:Price型 隶属于:单位统计代码组</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>创建时获取这些资源,删除或销毁时将其返回。 例如用于电力逻辑,负数供电和正数耗电。</p></div><h4 id="borrowresourceswhilealive-演示例子" tabindex="-1">borrowResourcesWhileAlive-演示例子 <a class="header-anchor" href="#borrowresourceswhilealive-演示例子" aria-label="Permalink to "borrowResourcesWhileAlive-演示例子""></a></h4><div class="language-ini"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#89DDFF;">[core]</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">borrowResourcesWhileAlive:5000</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#单位活着的时候给予5000金币,死亡扣除5000金币</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#一个小型贷款系统,</span></span></code></pre></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-4UNuL" id="tab-naTFcIJ" checked="checked"><label for="tab-naTFcIJ">考考你</label><input type="radio" name="group-4UNuL" id="tab-8OMUmGi"><label for="tab-8OMUmGi">显示答案</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">如果这里要通过这个代码做一个小的贷款系统,</span></span>
|
||||
<span class="line"><span style="color:#676E95;font-style:italic;">#一个小型贷款系统,</span></span></code></pre></div><div class="vp-code-group"><div class="tabs"><input type="radio" name="group-yWw4P" id="tab-Z0nd9i_" checked="checked"><label for="tab-Z0nd9i_">考考你</label><input type="radio" name="group-yWw4P" id="tab-bX-Pw9p"><label for="tab-bX-Pw9p">显示答案</label></div><div class="blocks"><div class="language-bash active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki material-theme-palenight"><code><span class="line"><span style="color:#FFCB6B;">如果这里要通过这个代码做一个小的贷款系统,</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">并经过一段时间让单位死亡。</span><span style="color:#A6ACCD;"> </span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">只需要4行代码即可实现,试试看。</span></span>
|
||||
<span class="line"><span style="color:#FFCB6B;">提示:dieOnZeroEnergy:</span><span style="color:#82AAFF;">true</span></span>
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,2 @@
|
|||
import{_ as n,o as r,c as i,C as l,z as s,a as e,x as a,N as t,D as c}from"./chunks/framework.afbd7175.js";const j=JSON.parse('{"title":"[LogicBoolean] 逻辑序列组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/loginboolean.md"}'),d={name:"src/Unit/loginboolean.md"},p=t("",4),u=a("code",null,"boolean",-1),h=t("",22),f=t("",6),m=a("br",null,null,-1),b=t("",4),_=a("h4",{id:"非",tabindex:"-1"},[e("非 "),a("a",{class:"header-anchor",href:"#非","aria-label":'Permalink to "非"'},"")],-1),g=a("p",null,[e("代码:not 中文释义:非"),a("br")],-1),y=a("code",null,"true",-1),T=a("code",null,"false",-1),q=a("code",null,"false",-1),A=a("code",null,"true",-1),C=a("code",null,"not>and>or",-1),D=a("br",null,null,-1),k=t("",7),v=t("",5),P=a("br",null,null,-1),I=t("",24),x=t("",13),F=t("",18),U=a("code",null,"self.hasFlag()",-1),O=a("code",null,"self.hasFlag(id=数字)",-1),E=a("br",null,null,-1),S=t("",15),N=t("",35),R={class:"danger custom-block"},V=a("p",{class:"custom-block-title"},"DANGER",-1),w=a("p",null,[a("a",{href:"https://www.bilibili.com/video/BV17v4y1r7dV",target:"_blank",rel:"noreferrer"},"https://www.bilibili.com/video/BV17v4y1r7dV"),e(" (感谢十山月)")],-1),B=a("iframe",{src:"//player.bilibili.com/player.html?aid=566144438&bvid=BV17v4y1r7dV&cid=988997369&page=1",scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",width:"100%",height:"400"},`
|
||||
`,-1),W=t("",1),M=t("",2);function Q(L,G,Y,$,z,H){const o=c("font");return r(),i("div",null,[p,l(o,{color:"orange"},{default:s(()=>[e("布尔值")]),_:1}),e("表达“真(true)”或“假(false)”的一个状态。在铁锈中,布尔值("),u,e(")被运用于逻辑判断。"),h,a("blockquote",null,[a("p",null,[e("[!TIP] 请注意,铁锈中等于的符号为"),l(o,{color:"orange"},{default:s(()=>[e("==")]),_:1}),e(","),l(o,{color:"orange"},{default:s(()=>[e("=")]),_:1}),e("在铁锈中用于赋值或参数。")])]),f,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("and")]),_:1}),e("用于连接两个逻辑判断,只有在这两个逻辑判断的值都为"),l(o,{color:"orange"},{default:s(()=>[e("true")]),_:1}),e("时,"),l(o,{color:"orange"},{default:s(()=>[e("and")]),_:1}),e("的值才为true。 "),m])]),b,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("or")]),_:1}),e("用于连接两个逻辑判断,只要这两个逻辑判断的值有一个为"),l(o,{color:"orange"},{default:s(()=>[e("true")]),_:1}),e("时,"),l(o,{color:"orange"},{default:s(()=>[e("or")]),_:1}),e("的值就为true。")])]),_,g,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("not")]),_:1}),e("用于将某个逻辑判断的值取反,即"),y,e("变"),T,e(","),q,e("变"),A,e("。")])]),a("blockquote",null,[a("p",null,[e("[!NOTE] 多个逻辑运算符同时使用时,优先级为"),C,e(",同时"),l(o,{color:"orange"},{default:s(()=>[e("支持使用括号改变运算优先级")]),_:1}),e("。 "),D,e("推荐"),l(o,{color:"orange"},{default:s(()=>[e("在不确定优先级时打括号")]),_:1}),e("。")])]),k,a("blockquote",null,[a("p",null,[e("[!NOTE] 不同数据类型通常"),l(o,{color:"orange"},{default:s(()=>[e("不能直接进行算数运算")]),_:1}),e(",但在部分情况下,"),l(o,{color:"orange"},{default:s(()=>[e("number")]),_:1}),e("和"),l(o,{color:"orange"},{default:s(()=>[e("float")]),_:1}),e("类型可以混用(建议"),l(o,{color:"orange"},{default:s(()=>[e("所有数值全部使用float")]),_:1}),e("来避免混淆)。")])]),v,a("blockquote",null,[a("p",null,[e("[!NOTE] 对于"),l(o,{color:"orange"},{default:s(()=>[e("不满足交换律的运算符")]),_:1}),e(",需要注意"),l(o,{color:"orange"},{default:s(()=>[e("运算优先级")]),_:1}),e("是否正确。由于铁锈本身bug,"),l(o,{color:"orange"},{default:s(()=>[e("在数学上正确的优先级不一定在铁锈中正确")]),_:1}),e(",因此可能出现减法顺序混乱等问题。 "),P,e("为了避免可能的问题,请尽量在任何"),l(o,{color:"orange"},{default:s(()=>[e("不满足交换律的运算符")]),_:1}),e("两边打上括号。")])]),I,a("blockquote",null,[a("p",null,[e("[!NOTE] 引用资源时,请确保"),l(o,{color:"orange"},{default:s(()=>[e("这个资源在这个单位定义过")]),_:1}),e(",否则会报错。")])]),x,a("blockquote",null,[a("p",null,[e("[!NOTE] 单位计时部分能返回到最小时间精度为"),l(o,{color:"orange"},{default:s(()=>[e("0.1秒")]),_:1}),e("。")])]),F,a("p",null,[U,e("用于获取自身是否有"),l(o,{color:"orange"},{default:s(()=>[e("标志")]),_:1}),e(",格式为"),O,e("。")]),a("blockquote",null,[a("p",null,[e("[!NOTE] 不同于"),l(o,{color:"orange"},{default:s(()=>[e("标签(tag)")]),_:1}),e(","),l(o,{color:"orange"},{default:s(()=>[e("标志(flag)")]),_:1}),e("是内置的一些"),l(o,{color:"orange"},{default:s(()=>[e("布尔值")]),_:1}),e(",无需定义即可直接使用。"),E,e(" 标签的添加方法为"),l(o,{color:"orange"},{default:s(()=>[e("[action]addResource:flag=1,3-7,13")]),_:1}),e(",且只支持"),l(o,{color:"orange"},{default:s(()=>[e("0-31")]),_:1}),e(",标签的移除方法与之相反。")])]),S,a("blockquote",null,[a("p",null,[e("[!NOTE] 路径点类型可以是"),l(o,{color:"orange"},{default:s(()=>[e("move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget")]),_:1}),e("。")])]),N,a("div",R,[V,a("p",null,[e("在"),l(o,{color:"orange"},{default:s(()=>[e("跨单位读取数组")]),_:1}),e("时,如果下标使用了逻辑,无论逻辑值都会返回第零项,")]),l(o,{color:"orange"},{default:s(()=>[e("为游戏bug")]),_:1}),e(",解决方法可以参考:"),w,B,W]),M])}const K=n(d,[["render",Q]]);export{j as __pageData,K as default};
|
||||
import{_ as n,o as r,c as i,C as l,z as s,a as e,x as a,N as t,D as c}from"./chunks/framework.afbd7175.js";const J=JSON.parse('{"title":"[LogicBoolean] 逻辑序列组","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"src/Unit/loginboolean.md"}'),d={name:"src/Unit/loginboolean.md"},p=t("",4),u=a("code",null,"boolean",-1),h=t("",22),f=t("",6),m=a("br",null,null,-1),b=t("",4),_=a("h4",{id:"非",tabindex:"-1"},[e("非 "),a("a",{class:"header-anchor",href:"#非","aria-label":'Permalink to "非"'},"")],-1),g=a("p",null,[e("代码:not 中文释义:非"),a("br")],-1),y=a("code",null,"true",-1),T=a("code",null,"false",-1),q=a("code",null,"false",-1),A=a("code",null,"true",-1),C=a("code",null,"not>and>or",-1),D=a("br",null,null,-1),k=t("",7),v=t("",5),P=a("br",null,null,-1),I=t("",24),x=t("",13),F=t("",18),U=a("code",null,"self.hasFlag()",-1),O=a("code",null,"self.hasFlag(id=数字)",-1),S=a("br",null,null,-1),E=t("",15),N=t("",35),R={class:"danger custom-block"},V=a("p",{class:"custom-block-title"},"DANGER",-1),w=a("p",null,[a("a",{href:"https://www.bilibili.com/video/BV17v4y1r7dV",target:"_blank",rel:"noreferrer"},"https://www.bilibili.com/video/BV17v4y1r7dV"),e(" (感谢十山月)")],-1),B=a("iframe",{src:"//player.bilibili.com/player.html?aid=566144438&bvid=BV17v4y1r7dV&cid=988997369&page=1",scrolling:"no",border:"0",frameborder:"no",framespacing:"0",allowfullscreen:"true",width:"100%",height:"400"},`
|
||||
`,-1),W=t("",1),M=t("",2);function Q(G,L,z,Y,Z,$){const o=c("font");return r(),i("div",null,[p,l(o,{color:"orange"},{default:s(()=>[e("布尔值")]),_:1}),e("表达“真(true)”或“假(false)”的一个状态。在铁锈中,布尔值("),u,e(")被运用于逻辑判断。"),h,a("blockquote",null,[a("p",null,[e("[!TIP] 请注意,铁锈中等于的符号为"),l(o,{color:"orange"},{default:s(()=>[e("==")]),_:1}),e(","),l(o,{color:"orange"},{default:s(()=>[e("=")]),_:1}),e("在铁锈中用于赋值或参数。")])]),f,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("and")]),_:1}),e("用于连接两个逻辑判断,只有在这两个逻辑判断的值都为"),l(o,{color:"orange"},{default:s(()=>[e("true")]),_:1}),e("时,"),l(o,{color:"orange"},{default:s(()=>[e("and")]),_:1}),e("的值才为true。 "),m])]),b,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("or")]),_:1}),e("用于连接两个逻辑判断,只要这两个逻辑判断的值有一个为"),l(o,{color:"orange"},{default:s(()=>[e("true")]),_:1}),e("时,"),l(o,{color:"orange"},{default:s(()=>[e("or")]),_:1}),e("的值就为true。")])]),_,g,a("blockquote",null,[a("p",null,[e("[!TIP] "),l(o,{color:"orange"},{default:s(()=>[e("not")]),_:1}),e("用于将某个逻辑判断的值取反,即"),y,e("变"),T,e(","),q,e("变"),A,e("。")])]),a("blockquote",null,[a("p",null,[e("[!NOTE] 多个逻辑运算符同时使用时,优先级为"),C,e(",同时"),l(o,{color:"orange"},{default:s(()=>[e("支持使用括号改变运算优先级")]),_:1}),e("。 "),D,e("推荐"),l(o,{color:"orange"},{default:s(()=>[e("在不确定优先级时打括号")]),_:1}),e("。")])]),k,a("blockquote",null,[a("p",null,[e("[!NOTE] 不同数据类型通常"),l(o,{color:"orange"},{default:s(()=>[e("不能直接进行算数运算")]),_:1}),e(",但在部分情况下,"),l(o,{color:"orange"},{default:s(()=>[e("number")]),_:1}),e("和"),l(o,{color:"orange"},{default:s(()=>[e("float")]),_:1}),e("类型可以混用(建议"),l(o,{color:"orange"},{default:s(()=>[e("所有数值全部使用float")]),_:1}),e("来避免混淆)。")])]),v,a("blockquote",null,[a("p",null,[e("[!NOTE] 对于"),l(o,{color:"orange"},{default:s(()=>[e("不满足交换律的运算符")]),_:1}),e(",需要注意"),l(o,{color:"orange"},{default:s(()=>[e("运算优先级")]),_:1}),e("是否正确。由于铁锈本身bug,"),l(o,{color:"orange"},{default:s(()=>[e("在数学上正确的优先级不一定在铁锈中正确")]),_:1}),e(",因此可能出现减法顺序混乱等问题。 "),P,e("为了避免可能的问题,请尽量在任何"),l(o,{color:"orange"},{default:s(()=>[e("不满足交换律的运算符")]),_:1}),e("两边打上括号。")])]),I,a("blockquote",null,[a("p",null,[e("[!NOTE] 引用资源时,请确保"),l(o,{color:"orange"},{default:s(()=>[e("这个资源在这个单位定义过")]),_:1}),e(",否则会报错。")])]),x,a("blockquote",null,[a("p",null,[e("[!NOTE] 单位计时部分能返回到最小时间精度为"),l(o,{color:"orange"},{default:s(()=>[e("0.1秒")]),_:1}),e("。")])]),F,a("p",null,[U,e("用于获取自身是否有"),l(o,{color:"orange"},{default:s(()=>[e("标志")]),_:1}),e(",格式为"),O,e("。")]),a("blockquote",null,[a("p",null,[e("[!NOTE] 不同于"),l(o,{color:"orange"},{default:s(()=>[e("标签(tag)")]),_:1}),e(","),l(o,{color:"orange"},{default:s(()=>[e("标志(flag)")]),_:1}),e("是内置的一些"),l(o,{color:"orange"},{default:s(()=>[e("布尔值")]),_:1}),e(",无需定义即可直接使用。"),S,e(" 标签的添加方法为"),l(o,{color:"orange"},{default:s(()=>[e("[action]addResource:flag=1,3-7,13")]),_:1}),e(",且只支持"),l(o,{color:"orange"},{default:s(()=>[e("0-31")]),_:1}),e(",标签的移除方法与之相反。")])]),E,a("blockquote",null,[a("p",null,[e("[!NOTE] 路径点类型可以是"),l(o,{color:"orange"},{default:s(()=>[e("move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget")]),_:1}),e("。")])]),N,a("div",R,[V,a("p",null,[e("在"),l(o,{color:"orange"},{default:s(()=>[e("跨单位读取数组")]),_:1}),e("时,如果下标使用了逻辑,无论逻辑值都会返回第零项,")]),l(o,{color:"orange"},{default:s(()=>[e("为游戏bug")]),_:1}),e(",解决方法可以参考:"),w,B,W]),M])}const K=n(d,[["render",Q]]);export{J as __pageData,K as default};
|
|
@ -1 +1 @@
|
|||
{"src_unit_graphics.md":"11d4f4e2","src_unit_loginboolean.md":"f52077c2","markdown-examples.md":"effb3764","index.md":"3f0b856d","src_map_tsada.md":"124b9478","src_unit_canbuild.md":"a704448b","src_unit_core.md":"b42203f0","src_debug_test.md":"374e13c1","api-examples.md":"cd86cd6d"}
|
||||
{"index.md":"3f0b856d","src_debug_test.md":"374e13c1","api-examples.md":"cd86cd6d","markdown-examples.md":"effb3764","src_map_tsada.md":"124b9478","src_unit_canbuild.md":"a704448b","src_unit_core.md":"e90f9199","src_unit_graphics.md":"11d4f4e2","src_unit_loginboolean.md":"d8c936e3"}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,7 +6,7 @@
|
|||
<title>Markdown Extension Examples | RW-API_Code</title>
|
||||
<meta name="description" content="Easy Code">
|
||||
<link rel="preload stylesheet" href="/assets/style.0fe59653.css" as="style">
|
||||
<script type="module" src="/assets/app.0cd90b67.js"></script>
|
||||
<script type="module" src="/assets/app.b9accf65.js"></script>
|
||||
<link rel="preload" href="/assets/inter-roman-latin.2ed14f66.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="modulepreload" href="/assets/chunks/framework.afbd7175.js">
|
||||
<link rel="modulepreload" href="/assets/chunks/theme.a458785b.js">
|
||||
|
@ -47,7 +47,7 @@
|
|||
<span class="line"><span style="color:#A6ACCD;">::: details</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">This is a details block.</span></span>
|
||||
<span class="line"><span style="color:#A6ACCD;">:::</span></span></code></pre></div><p><strong>Output</strong></p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>This is an info box.</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>This is a tip.</p></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This is a warning.</p></div><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>This is a dangerous warning.</p></div><details class="details custom-block"><summary>Details</summary><p>This is a details block.</p></details><h2 id="more" tabindex="-1">More <a class="header-anchor" href="#more" aria-label="Permalink to "More""></a></h2><p>Check out the documentation for the <a href="https://vitepress.dev/guide/markdown" target="_blank" rel="noreferrer">full list of markdown extensions</a>.</p></div></div></main><footer class="VPDocFooter" data-v-c4b0d3cf data-v-face870a><!--[--><!--]--><!----><div class="prev-next" data-v-face870a><div class="pager" data-v-face870a><!----></div><div class="pager" data-v-face870a><a class="pager-link next" href="/src/Unit/core" data-v-face870a><span class="desc" data-v-face870a>下一篇文章</span><span class="title" data-v-face870a>核心-CORE</span></a></div></div></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-b2cf3e0b data-v-2f86ebd2><div class="container" data-v-2f86ebd2><p class="message" data-v-2f86ebd2>Rosy-Code Ling Web Stuido</p><p class="copyright" data-v-2f86ebd2>Copyright © 2023-RW-API-Code</p></div></footer><!--[--><!--]--></div></div>
|
||||
<script>__VP_HASH_MAP__ = JSON.parse("{\"src_unit_graphics.md\":\"11d4f4e2\",\"src_unit_loginboolean.md\":\"f52077c2\",\"markdown-examples.md\":\"effb3764\",\"index.md\":\"3f0b856d\",\"src_map_tsada.md\":\"124b9478\",\"src_unit_canbuild.md\":\"a704448b\",\"src_unit_core.md\":\"b42203f0\",\"src_debug_test.md\":\"374e13c1\",\"api-examples.md\":\"cd86cd6d\"}")
|
||||
<script>__VP_HASH_MAP__ = JSON.parse("{\"index.md\":\"3f0b856d\",\"src_debug_test.md\":\"374e13c1\",\"api-examples.md\":\"cd86cd6d\",\"markdown-examples.md\":\"effb3764\",\"src_map_tsada.md\":\"124b9478\",\"src_unit_canbuild.md\":\"a704448b\",\"src_unit_core.md\":\"e90f9199\",\"src_unit_graphics.md\":\"11d4f4e2\",\"src_unit_loginboolean.md\":\"d8c936e3\"}")
|
||||
__VP_SITE_DATA__ = JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"RW-API_Code\",\"description\":\"Easy Code\",\"base\":\"/\",\"head\":[],\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"主页\",\"link\":\"/\"},{\"text\":\"单位API\",\"link\":\"/src/Unit/core\"},{\"text\":\"地图API\",\"link\":\"/src/Map/teada\"},{\"text\":\"调试API\",\"link\":\"/src/Debug/test\"},{\"text\":\"开发指南\",\"link\":\"/DEV\"}],\"docFooter\":{\"prev\":\"上一篇文章\",\"next\":\"下一篇文章\"},\"sidebar\":[{\"text\":\"RW-API-Code\",\"items\":[{\"text\":\"主页-Home\",\"link\":\"/markdown-examples\"},{\"text\":\"核心-CORE\",\"link\":\"/src/Unit/core\"},{\"text\":\"可建造-CORE\",\"link\":\"/src/Unit/canbuild\"},{\"text\":\"逻辑组-LogicBoolean\",\"link\":\"/src/Unit/loginboolean\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/vuejs/vitepress\"}],\"footer\":{\"message\":\"Rosy-Code Ling Web Stuido\",\"copyright\":\"Copyright © 2023-RW-API-Code\"}},\"locales\":{},\"scrollOffset\":90,\"cleanUrls\":true}")</script>
|
||||
|
||||
</body>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user