Commit a944821f authored by nachtgold's avatar nachtgold
Browse files

boost added to step

parent 70fc5c74
...@@ -126,8 +126,12 @@ end ...@@ -126,8 +126,12 @@ end
-- A negative angle means turn left and a positive angle -- A negative angle means turn left and a positive angle
-- means turn right. With 0, the snake keeps its direction. -- means turn right. With 0, the snake keeps its direction.
-- @return new angle relative to the head direction -- @return new angle relative to the head direction
--@return if true the snake will use boost, otherwise false or empty (optional)
-- @usage function step() -- @usage function step()
-- return 0.005 -- return 0.005
-- end -- end
-- @usage function step()
-- return 0.005, true
-- end
function step() function step()
end end
...@@ -271,17 +271,22 @@ ...@@ -271,17 +271,22 @@
<h4>Returns:</h4> <h4>Returns:</h4>
<ol> <ol>
<li>
new angle relative to the head direction new angle relative to the head direction</li>
<li>
if true the snake will use boost, otherwise false or empty (optional)</li>
</ol> </ol>
<h4>Usage:</h4> <h4>Usage:</h4>
<ul> <ul>
<pre class="usage"><code class="lua"> <span class="keyword">function</span> step() <li><pre class="usage"><code class="lua"> <span class="keyword">function</span> step()
<span class="keyword">return</span> <span class="number">0.005</span> <span class="keyword">return</span> <span class="number">0.005</span>
<span class="keyword">end</span></code></pre> <span class="keyword">end</span></code></pre></li>
<li><pre class="usage"><code class="lua"> <span class="keyword">function</span> step()
<span class="keyword">return</span> <span class="number">0.005</span>, <span class="keyword">true</span>
<span class="keyword">end</span></code></pre></li>
</ul> </ul>
</dd> </dd>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment