From fe92968dcd63a6bb9732bfdc35dc24d9b16163c0 Mon Sep 17 00:00:00 2001 From: desktop Date: Fri, 11 Dec 2020 23:14:56 +0100 Subject: [PATCH] Added CharacterOption scene --- GUI/CharacterOption.gd | 9 +++++ GUI/CharacterOption.tscn | 36 +++++++++++++++++++ CharacterSelect.gd => GUI/CharacterSelect.gd | 0 .../CharacterSelect.tscn | 2 +- Game.tscn | 2 +- 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 GUI/CharacterOption.gd create mode 100644 GUI/CharacterOption.tscn rename CharacterSelect.gd => GUI/CharacterSelect.gd (100%) rename CharacterSelect.tscn => GUI/CharacterSelect.tscn (96%) diff --git a/GUI/CharacterOption.gd b/GUI/CharacterOption.gd new file mode 100644 index 0000000..0ccd86c --- /dev/null +++ b/GUI/CharacterOption.gd @@ -0,0 +1,9 @@ +extends Control + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + +func _process(delta): + $Viewport.size = rect_size diff --git a/GUI/CharacterOption.tscn b/GUI/CharacterOption.tscn new file mode 100644 index 0000000..71a697d --- /dev/null +++ b/GUI/CharacterOption.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Assets/Characters/HerMajestyTheQueen/HerMajestyTheQueen.tscn" type="PackedScene" id=1] +[ext_resource path="res://GUI/CharacterOption.gd" type="Script" id=2] + +[sub_resource type="ViewportTexture" id=1] +viewport_path = NodePath("Viewport") + +[node name="CharacterOption" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +script = ExtResource( 2 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="CharacterDisplay" type="TextureButton" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +texture_normal = SubResource( 1 ) +expand = true +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Viewport" type="Viewport" parent="."] +size = Vector2( 500, 500 ) +transparent_bg = true +msaa = 2 +render_target_v_flip = true + +[node name="Camera" type="Camera" parent="Viewport"] +transform = Transform( -1, 0, -3.25841e-07, 0, 1, 0, 3.25841e-07, 0, -1, 0, 1.38191, -6.32464 ) +fov = 39.6532 + +[node name="HerMajestyTheQueen" parent="Viewport" instance=ExtResource( 1 )] diff --git a/CharacterSelect.gd b/GUI/CharacterSelect.gd similarity index 100% rename from CharacterSelect.gd rename to GUI/CharacterSelect.gd diff --git a/CharacterSelect.tscn b/GUI/CharacterSelect.tscn similarity index 96% rename from CharacterSelect.tscn rename to GUI/CharacterSelect.tscn index 673eb10..336359c 100644 --- a/CharacterSelect.tscn +++ b/GUI/CharacterSelect.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://CharacterSelect.gd" type="Script" id=1] +[ext_resource path="res://GUI/CharacterSelect.gd" type="Script" id=1] [ext_resource path="res://GUI/theme.tres" type="Theme" id=2] [node name="CharacterSelect" type="Control"] diff --git a/Game.tscn b/Game.tscn index 1950f08..2274536 100644 --- a/Game.tscn +++ b/Game.tscn @@ -3,7 +3,7 @@ [ext_resource path="res://GUI/theme.tres" type="Theme" id=1] [ext_resource path="res://Game.gd" type="Script" id=2] [ext_resource path="res://Level.tscn" type="PackedScene" id=3] -[ext_resource path="res://CharacterSelect.tscn" type="PackedScene" id=4] +[ext_resource path="res://GUI/CharacterSelect.tscn" type="PackedScene" id=4] [sub_resource type="ProceduralSky" id=1]