diff --git a/HanafudaCard.gd b/HanafudaCard.gd new file mode 100644 index 0000000..3a32e43 --- /dev/null +++ b/HanafudaCard.gd @@ -0,0 +1,40 @@ +extends Sprite + +enum Month { + JANUARY, + FEBRUARY, + MARCH, + APRIL, + MAY, + JUNE, + JULY, + AUGUST, + SEPTEMBER, + OCTOBER, + NOVEMBER, + DECEMBER, +} + +enum Flower { + PINE, + PLUM_BLOSSOM, + CHERRY_BLOSSOM, + WISTERIA, + IRIS, + PEONY, + BUSH_CLOVER, + GRASS, + CHRYSANTHEMUM, + MAPLE, + WILLOW, + PAULOWNIA, +} + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass diff --git a/HanafudaCard.tscn b/HanafudaCard.tscn new file mode 100644 index 0000000..408bdfe --- /dev/null +++ b/HanafudaCard.tscn @@ -0,0 +1,10 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://HanafudaCard.gd" type="Script" id=1] +[ext_resource path="res://assets/png/Hanafuda_April_Kasu_1.png" type="Texture" id=2] + +[node name="HanafudaCard" type="Sprite"] +position = Vector2( 292.75, 250.01 ) +scale = Vector2( 0.2, 0.2 ) +texture = ExtResource( 2 ) +script = ExtResource( 1 ) diff --git a/Main.tscn b/Main.tscn index 61d8332..e91d961 100644 --- a/Main.tscn +++ b/Main.tscn @@ -1,10 +1,7 @@ [gd_scene load_steps=2 format=2] -[ext_resource path="res://assets/png/Hanafuda_April_Kasu_1.png" type="Texture" id=1] +[ext_resource path="res://HanafudaCard.tscn" type="PackedScene" id=1] [node name="Node2D" type="Node2D"] -[node name="HanafudaAprilKasu1" type="Sprite" parent="."] -position = Vector2( 292.75, 250.01 ) -scale = Vector2( 0.2, 0.2 ) -texture = ExtResource( 1 ) +[node name="HanafudaCard" parent="." instance=ExtResource( 1 )]