<?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>今回は、gdscript を静的型付け言語（っぽく）使う方法について紹介します。 gdscriptは本来は型を決めずにプログラムを書ける動的型付け言語ですが、書き方や設定方法によってはC#のように型に厳しい書き方ができます。 1. 明示的な型アノテーションを使う 例えば以下の変数 &quot;hp&quot; は明確な型が指定されていないため、自由な値を代入できてしまいます。 # 型アノテーションなし. var hp = 100 func _ready() -&gt; void: hp = 100.123 print(hp) # 100,123と出力される. hp = &quot;hero&quot; # 文字列も代入可能. print(…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2F2dgames.jp%2Fentry%2F2025%2F10%2F09%2F103000&quot; title=&quot;【Godot4.x】gdscriptを静的型付け言語として使う方法 - 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>https://cdn-ak.f.st-hatena.com/images/fotolife/s/syun77/20250901/20250901002420.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-10-09 10:30:00</published>
  <title>【Godot4.x】gdscriptを静的型付け言語として使う方法</title>
  <type>rich</type>
  <url>https://2dgames.jp/entry/2025/10/09/103000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
