<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>syun77</author_name>
  <author_url>https://blog.hatena.ne.jp/syun77/</author_url>
  <blog_title>2dgames.jp</blog_title>
  <blog_url>https://2dgames.jp/</blog_url>
  <categories>
    <anon>Godot</anon>
  </categories>
  <description>この記事では、文字列指定で変数や関数にアクセスする方法について書きます。 get() / set() で変数を操作する GDScriptでは、get() / set() を使うことで文字列で変数にアクセスできます。 extends Node2D var hp = 1 func _ready(): print(&quot;hp: %d&quot;%hp) # 文字列で &quot;hp&quot; から値を取得する print(&quot;hp: %d&quot;%get(&quot;hp&quot;)) # 文字列で &quot;hp&quot; に値を設定する set(&quot;hp&quot;, 100) print(&quot;hp: %d&quot;%hp) 実行結果は以下のとおりです。 実行結果hp: 1 hp: 1 …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2F2dgames.jp%2Fentry%2Fgodot-duck-typing%2F&quot; title=&quot;【Godot】文字列で変数や関数にアクセスする方法 - 2dgames.jp&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-11-25 17:01:25</published>
  <title>【Godot】文字列で変数や関数にアクセスする方法</title>
  <type>rich</type>
  <url>https://2dgames.jp/entry/godot-duck-typing/</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
