From 5503d1e735b4f16401d2454bab801b05053e5858 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Thu, 21 Nov 2019 00:25:53 +0100 Subject: [PATCH] add taquin scene --- game/project.godot | 2 +- game/src/Main.tscn | 10 ++++++++-- game/src/Taquin.gd | 15 +++++++++++++++ game/src/Taquin.tscn | 12 ++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 game/src/Taquin.gd create mode 100644 game/src/Taquin.tscn diff --git a/game/project.godot b/game/project.godot index 0fbbd8d..c456e2d 100644 --- a/game/project.godot +++ b/game/project.godot @@ -15,7 +15,7 @@ _global_script_class_icons={ [application] -config/name="Takin" +config/name="Taqin" run/main_scene="res://src/Main.tscn" config/icon="res://icon.png" diff --git a/game/src/Main.tscn b/game/src/Main.tscn index 70a653e..37e5f52 100644 --- a/game/src/Main.tscn +++ b/game/src/Main.tscn @@ -1,3 +1,9 @@ -[gd_scene format=2] +[gd_scene load_steps=2 format=2] -[node name="Main" type="Node2D"] +[ext_resource path="res://src/Taquin.tscn" type="PackedScene" id=1] + +[node name="Main" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 + +[node name="Taquin" parent="." instance=ExtResource( 1 )] diff --git a/game/src/Taquin.gd b/game/src/Taquin.gd new file mode 100644 index 0000000..7073b85 --- /dev/null +++ b/game/src/Taquin.gd @@ -0,0 +1,15 @@ +extends Node2D + +# Declare member variables here. Examples: +# var a = 2 +# var b = "text" +export var rows: int = 4 +export var columns: int = 4 + +# 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/game/src/Taquin.tscn b/game/src/Taquin.tscn new file mode 100644 index 0000000..6eebea6 --- /dev/null +++ b/game/src/Taquin.tscn @@ -0,0 +1,12 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://src/Taquin.gd" type="Script" id=1] + +[sub_resource type="NoiseTexture" id=1] + +[node name="Node2D" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( 511, 311 ) +texture = SubResource( 1 )