<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ru_shalm</author_name>
  <author_url>https://blog.hatena.ne.jp/ru_shalm/</author_url>
  <blog_title>鳥小屋.txt</blog_title>
  <blog_url>https://blog.toripota.com/</blog_url>
  <categories>
    <anon>制作</anon>
    <anon>Lua</anon>
  </categories>
  <description>これからはなるべく日記書くようにしようと思いました。自分の覚え書きもなりますし。 前回に引き続きLuaのこと。Luaにはコルーチンなるものがあります。ゲーム系だとマイクロスレッドって呼ぶそうです。これは途中で中断してあとで再開できる関数みたいなものらしいです。 これを使うとどういうメリットがあるのかというと、 // 従来の場合 var フレーム数=0; function update() { if ( 0〜14フレーム目の時 ){ 右に移動 } if ( 15フレーム目の時 ){ 攻撃発生 } if ( 30フレーム以降 ){ 左に移動 } フレーム数 = フレーム数 + 1 }こんな感じだっ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.toripota.com%2Fentry%2F20101103%2FLua_coroutine&quot; title=&quot;Luaのコルーチンで実験 - 鳥小屋.txt&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn.user.blog.st-hatena.com/default_entry_og_image/22041559/1514246458853067</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-11-03 00:00:00</published>
  <title>Luaのコルーチンで実験</title>
  <type>rich</type>
  <url>https://blog.toripota.com/entry/20101103/Lua_coroutine</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
