basic-move-and-dodge-game

[LEARNING] basic godot game based off the tutorial by borncg on youtube
git clone git://git.figbert.com/basic-move-and-dodge-game.git
Log | Files | Refs | README

commit b5b22561e02c5d1aaa5e6a7d541e5f8edabcafbe
parent 3ba80b8be12759cbae1bcac1c839ea77ffe6e13f
Author: FIGBERT <figbert@figbert.com>
Date:   Wed, 25 Nov 2020 14:03:32 -0800

Update code for sixth section of Godot tutorial

Diffstat:
AMenu.tscn | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Aassets/fonts/DIN-Alternate-Bold.ttf | 0
Aassets/fonts/JetBrainsMono-Regular.ttf | 0
Mproject.godot | 1+
Ascripts/TitlePlayButton.gd | 7+++++++
5 files changed, 70 insertions(+), 0 deletions(-)

diff --git a/Menu.tscn b/Menu.tscn @@ -0,0 +1,62 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://assets/fonts/JetBrainsMono-Regular.ttf" type="DynamicFontData" id=1] +[ext_resource path="res://assets/fonts/DIN-Alternate-Bold.ttf" type="DynamicFontData" id=2] +[ext_resource path="res://scripts/TitlePlayButton.gd" type="Script" id=3] + +[sub_resource type="DynamicFont" id=1] +size = 128 +use_filter = true +font_data = ExtResource( 1 ) + +[sub_resource type="DynamicFont" id=2] +size = 64 +use_filter = true +font_data = ExtResource( 2 ) + +[node name="Control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 1280.0 +margin_bottom = 720.0 +color = Color( 0.713726, 0.678431, 0.623529, 1 ) +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="Label" type="Label" parent="."] +margin_top = 64.0 +margin_right = 1280.0 +margin_bottom = 259.0 +custom_fonts/font = SubResource( 1 ) +custom_colors/font_color = Color( 0.0392157, 0.933333, 0.682353, 1 ) +custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) +custom_constants/shadow_offset_x = 6 +text = "Simple 3D Game" +align = 1 +valign = 1 +__meta__ = { +"_edit_use_anchors_": false +} + +[node name="TitlePlayButton" type="Button" parent="."] +margin_left = 462.026 +margin_top = 415.838 +margin_right = 819.026 +margin_bottom = 542.838 +custom_fonts/font = SubResource( 2 ) +custom_colors/font_color = Color( 0.682353, 0.933333, 0.0392157, 1 ) +custom_colors/font_color_hover = Color( 1, 0.556863, 0.0392157, 1 ) +custom_colors/font_color_pressed = Color( 0.917647, 0.129412, 0.796078, 1 ) +text = "PLAY" +script = ExtResource( 3 ) +__meta__ = { +"_edit_use_anchors_": false, +"_editor_description_": "" +} +[connection signal="pressed" from="TitlePlayButton" to="TitlePlayButton" method="_on_TitlePlayButton_pressed"] diff --git a/assets/fonts/DIN-Alternate-Bold.ttf b/assets/fonts/DIN-Alternate-Bold.ttf Binary files differ. diff --git a/assets/fonts/JetBrainsMono-Regular.ttf b/assets/fonts/JetBrainsMono-Regular.ttf Binary files differ. diff --git a/project.godot b/project.godot @@ -16,6 +16,7 @@ _global_script_class_icons={ [application] config/name="Basic Move and Dodge Game" +run/main_scene="res://Menu.tscn" config/icon="res://icon.png" [display] diff --git a/scripts/TitlePlayButton.gd b/scripts/TitlePlayButton.gd @@ -0,0 +1,7 @@ +extends Button + +func _ready(): + pass + +func _on_TitlePlayButton_pressed(): + get_tree().change_scene("res://Level.tscn")