diff --git a/src/models/spell_cell/SpellCell.tscn b/src/models/spell_cell/SpellCell.tscn new file mode 100644 index 0000000..d50ca36 --- /dev/null +++ b/src/models/spell_cell/SpellCell.tscn @@ -0,0 +1,13 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://src/models/spell_cell/sprites/spell_frame.png" type="Texture" id=1] + +[node name="SpellCell" type="Control"] +margin_right = 14.0 +margin_bottom = 14.0 + +[node name="Frame" type="Sprite" parent="."] +texture = ExtResource( 1 ) +centered = false + +[node name="Spell" type="Sprite" parent="."] diff --git a/src/models/spell_cell/sprites/spell_frame.png b/src/models/spell_cell/sprites/spell_frame.png new file mode 100644 index 0000000..4887c46 Binary files /dev/null and b/src/models/spell_cell/sprites/spell_frame.png differ diff --git a/src/models/spell_cell/sprites/spell_frame.png.import b/src/models/spell_cell/sprites/spell_frame.png.import new file mode 100644 index 0000000..6857c81 --- /dev/null +++ b/src/models/spell_cell/sprites/spell_frame.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/spell_frame.png-be0df25df81327942b069dcc03b14b4d.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/models/spell_cell/sprites/spell_frame.png" +dest_files=[ "res://.import/spell_frame.png-be0df25df81327942b069dcc03b14b4d.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/scenes/game/Game.tscn b/src/scenes/game/Game.tscn index 493d30e..f9d4c32 100644 --- a/src/scenes/game/Game.tscn +++ b/src/scenes/game/Game.tscn @@ -1,9 +1,30 @@ -[gd_scene format=2] +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://src/scenes/game/sprites/background_stones.png" type="Texture" id=1] +[ext_resource path="res://src/scenes/game/sprites/background_houses.png" type="Texture" id=2] +[ext_resource path="res://src/scenes/game/spell_holder.gd" type="Script" id=3] [node name="Game" type="Node"] [node name="View" type="Node2D" parent="."] +[node name="Background" type="Node2D" parent="View"] + +[node name="Stones" type="Sprite" parent="View/Background"] +texture = ExtResource( 1 ) +centered = false + +[node name="Houses" type="Sprite" parent="View/Background"] +texture = ExtResource( 2 ) +centered = false + [node name="UI" type="Control" parent="."] margin_right = 40.0 margin_bottom = 40.0 + +[node name="SpellHolder" type="Control" parent="UI"] +margin_left = 120.0 +margin_top = 130.0 +margin_right = 200.0 +margin_bottom = 144.0 +script = ExtResource( 3 ) diff --git a/src/scenes/game/spell_holder.gd b/src/scenes/game/spell_holder.gd new file mode 100644 index 0000000..7893742 --- /dev/null +++ b/src/scenes/game/spell_holder.gd @@ -0,0 +1,9 @@ +extends Control + +var cell_preload = preload("res://src/models/spell_cell/SpellCell.tscn") + +func _ready(): + for i in range(5): + var spell_cell = cell_preload.instance() + spell_cell.rect_position.x += i * (14 + 2) + self.add_child(spell_cell) diff --git a/src/scenes/game/sprites/background_houses.png b/src/scenes/game/sprites/background_houses.png new file mode 100644 index 0000000..1f31d43 Binary files /dev/null and b/src/scenes/game/sprites/background_houses.png differ diff --git a/src/scenes/game/sprites/background_houses.png.import b/src/scenes/game/sprites/background_houses.png.import new file mode 100644 index 0000000..483b6bf --- /dev/null +++ b/src/scenes/game/sprites/background_houses.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/background_houses.png-cda110e650cc7b69c3e7b78cc3aaf5b7.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/background_houses.png" +dest_files=[ "res://.import/background_houses.png-cda110e650cc7b69c3e7b78cc3aaf5b7.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/src/scenes/game/sprites/background_stones.png b/src/scenes/game/sprites/background_stones.png new file mode 100644 index 0000000..33ab882 Binary files /dev/null and b/src/scenes/game/sprites/background_stones.png differ diff --git a/src/scenes/game/sprites/background_stones.png.import b/src/scenes/game/sprites/background_stones.png.import new file mode 100644 index 0000000..39cdccc --- /dev/null +++ b/src/scenes/game/sprites/background_stones.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/background_stones.png-4770615c08d52e38430ff8f769652a72.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://src/scenes/game/sprites/background_stones.png" +dest_files=[ "res://.import/background_stones.png-4770615c08d52e38430ff8f769652a72.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0