gameboy
This commit is contained in:
BIN
font/BigBlueTerm437NerdFont-Regular.ttf
Normal file
BIN
font/BigBlueTerm437NerdFont-Regular.ttf
Normal file
Binary file not shown.
34
font/BigBlueTerm437NerdFont-Regular.ttf.import
Normal file
34
font/BigBlueTerm437NerdFont-Regular.ttf.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://bkfllwhocw058"
|
||||
path="res://.godot/imported/BigBlueTerm437NerdFont-Regular.ttf-207acff9e3c31b83a23ed258a2c552c9.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://font/BigBlueTerm437NerdFont-Regular.ttf"
|
||||
dest_files=["res://.godot/imported/BigBlueTerm437NerdFont-Regular.ttf-207acff9e3c31b83a23ed258a2c552c9.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
34
model/GCMenu.png.import
Normal file
34
model/GCMenu.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://uudw2vydoal1"
|
||||
path="res://.godot/imported/GCMenu.png-d76f0a23e54f38e66d7932e9c3d4fbda.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://model/GCMenu.png"
|
||||
dest_files=["res://.godot/imported/GCMenu.png-d76f0a23e54f38e66d7932e9c3d4fbda.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -83,7 +83,6 @@ text = "Exit
|
||||
"
|
||||
|
||||
[node name="trick" type="Panel" parent="."]
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
pivot_offset = Vector2(-200, -150)
|
||||
theme_override_styles/panel = SubResource("StyleBoxEmpty_q8v2y")
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://bj1ita42m6vj5"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://bj1ita42m6vj5"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://blkdbhu6usvic" path="res://model/GameConsole.png" id="1_1xnas"]
|
||||
[ext_resource type="Script" path="res://script/Gameboy.cs" id="1_8q5hj"]
|
||||
[ext_resource type="Texture2D" uid="uid://uudw2vydoal1" path="res://model/GCMenu.png" id="2_06g1x"]
|
||||
[ext_resource type="Theme" uid="uid://547aer6bl6w8" path="res://themes/theme_buttons_gameboy.tres" id="4_a5nt6"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_fjb7e"]
|
||||
bg_color = Color(0.0862745, 0.0862745, 0.0862745, 0.596078)
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer"]
|
||||
script = ExtResource("1_8q5hj")
|
||||
|
||||
[node name="Panel" type="Panel" parent="."]
|
||||
anchors_preset = 15
|
||||
@@ -27,3 +31,26 @@ grow_vertical = 2
|
||||
|
||||
[node name="GameConsole" type="Sprite2D" parent="Panel/CenterContainer"]
|
||||
texture = ExtResource("1_1xnas")
|
||||
|
||||
[node name="GcMenu" type="Sprite2D" parent="Panel/CenterContainer"]
|
||||
texture = ExtResource("2_06g1x")
|
||||
|
||||
[node name="A" type="Button" parent="."]
|
||||
offset_left = 125.0
|
||||
offset_top = 186.0
|
||||
offset_right = 149.0
|
||||
offset_bottom = 218.0
|
||||
theme = ExtResource("4_a5nt6")
|
||||
text = " "
|
||||
|
||||
[node name="B" type="Button" parent="."]
|
||||
offset_left = 164.0
|
||||
offset_top = 207.0
|
||||
offset_right = 188.0
|
||||
offset_bottom = 239.0
|
||||
theme = ExtResource("4_a5nt6")
|
||||
text = " "
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="."]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
30
script/Gameboy.cs
Normal file
30
script/Gameboy.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Gameboy : CanvasLayer
|
||||
{
|
||||
[Export] CharacterBody2D player;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void start()
|
||||
{
|
||||
player.Set("pausable", false);
|
||||
this.Visible = true;
|
||||
}
|
||||
|
||||
void stop()
|
||||
{
|
||||
player.Set("pausable", true);
|
||||
this.Visible = false;
|
||||
}
|
||||
}
|
||||
@@ -35,6 +35,8 @@ public partial class Player : CharacterBody2D
|
||||
[Export] AudioStream aud_glissemie;
|
||||
[Export] AudioStream aud_voiture;
|
||||
[Export] AudioStream aud_win;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +46,7 @@ public partial class Player : CharacterBody2D
|
||||
const float MAX_SUGAR = 100;
|
||||
bool end = false;
|
||||
|
||||
|
||||
bool pausable { get; set; } = true;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
@@ -110,7 +112,7 @@ public partial class Player : CharacterBody2D
|
||||
}
|
||||
|
||||
|
||||
if(Input.IsActionPressed("quit"))
|
||||
if(Input.IsActionPressed("quit") && pausable)
|
||||
{
|
||||
Input.MouseMode = Input.MouseModeEnum.Visible;
|
||||
GetTree().Paused= true;
|
||||
|
||||
40
themes/theme_buttons_gameboy.tres
Normal file
40
themes/theme_buttons_gameboy.tres
Normal file
@@ -0,0 +1,40 @@
|
||||
[gd_resource type="Theme" load_steps=7 format=3 uid="uid://547aer6bl6w8"]
|
||||
|
||||
[ext_resource type="FontFile" uid="uid://bkfllwhocw058" path="res://font/BigBlueTerm437NerdFont-Regular.ttf" id="1_fdr33"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_e1nme"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_lbuyh"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_sl5tx"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_ss4a4"]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_opuh8"]
|
||||
|
||||
[resource]
|
||||
default_font = ExtResource("1_fdr33")
|
||||
Button/colors/font_color = Color(0.875, 0.875, 0.875, 1)
|
||||
Button/colors/font_disabled_color = Color(0.875, 0.875, 0.875, 0.5)
|
||||
Button/colors/font_focus_color = Color(0.95, 0.95, 0.95, 1)
|
||||
Button/colors/font_hover_color = Color(0.95, 0.95, 0.95, 1)
|
||||
Button/colors/font_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
Button/colors/font_outline_color = Color(0, 0, 0, 1)
|
||||
Button/colors/font_pressed_color = Color(1, 1, 1, 1)
|
||||
Button/colors/icon_disabled_color = Color(1, 1, 1, 0.4)
|
||||
Button/colors/icon_focus_color = Color(1, 1, 1, 1)
|
||||
Button/colors/icon_hover_color = Color(1, 1, 1, 1)
|
||||
Button/colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
|
||||
Button/colors/icon_normal_color = Color(1, 1, 1, 1)
|
||||
Button/colors/icon_pressed_color = Color(1, 1, 1, 1)
|
||||
Button/constants/align_to_largest_stylebox = 0
|
||||
Button/constants/h_separation = 0
|
||||
Button/constants/icon_max_width = 0
|
||||
Button/constants/outline_size = 0
|
||||
Button/font_sizes/font_size = 24
|
||||
Button/fonts/font = ExtResource("1_fdr33")
|
||||
Button/styles/disabled = SubResource("StyleBoxEmpty_e1nme")
|
||||
Button/styles/focus = SubResource("StyleBoxEmpty_lbuyh")
|
||||
Button/styles/hover = SubResource("StyleBoxEmpty_sl5tx")
|
||||
Button/styles/normal = SubResource("StyleBoxEmpty_ss4a4")
|
||||
Button/styles/pressed = SubResource("StyleBoxEmpty_opuh8")
|
||||
Reference in New Issue
Block a user