<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hiro128</author_name>
  <author_url>https://blog.hatena.ne.jp/hiro128/</author_url>
  <blog_title>個人的なメモ</blog_title>
  <blog_url>https://hiro128.hatenablog.jp/</blog_url>
  <categories>
    <anon>Xamarin</anon>
    <anon>Cocos Sharp</anon>
  </categories>
  <description>今回は、加速度センサーの値を利用してキャラクターを動かしてみます。画面を傾けた方向に自機が動きます。 これでいよいよゲームっぽくなります。まずは、加速度センサーの値の取得を調整します。・画面を横向きにしているのでX軸、Y軸がてれこになります。 ・ちょうど手に持った時の角度をニュートラルにするために Math.Atan2 で角度にオフセットを入れます。この処理はネイティブ部分で行なっているので、iOS, Android それぞれのセンサーの値取得部分を修正します。iOS は下記の通りです。CocosSharpGameSample.iOS プロジェクトの AppDelegate.cs // センサ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhiro128.hatenablog.jp%2Fentry%2F2016%2F04%2F15%2F202433&quot; title=&quot;Xamarin + Cocos Sharp で iOS, Android 対応のゲームを開発する手順 (9) 加速度センサーの値でキャラクターを動かす。 - 個人的なメモ&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>http://cdn-ak.f.st-hatena.com/images/fotolife/h/hiro128/20160415/20160415201729.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-04-15 20:24:33</published>
  <title>Xamarin + Cocos Sharp で iOS, Android 対応のゲームを開発する手順 (9) 加速度センサーの値でキャラクターを動かす。</title>
  <type>rich</type>
  <url>https://hiro128.hatenablog.jp/entry/2016/04/15/202433</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
