Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added microjogos/2025S1/fast_food_pocao/capa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions microjogos/2025S1/fast_food_pocao/capa.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://db0lquq5yyqig"
path="res://.godot/imported/capa.png-a045c9d29b59841e022420c9f3cf5826.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2025S1/fast_food_pocao/capa.png"
dest_files=["res://.godot/imported/capa.png-a045c9d29b59841e022420c9f3cf5826.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
197 changes: 197 additions & 0 deletions microjogos/2025S1/fast_food_pocao/cenas/main.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
[gd_scene load_steps=18 format=3 uid="uid://cw7bb6dljqkxg"]

[ext_resource type="Script" uid="uid://d04sirxomapuy" path="res://microjogos/2025S1/fast_food_pocao/cenas/scripts/main.gd" id="1_soe26"]
[ext_resource type="Texture2D" uid="uid://mf2koxn56aue" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/pocao_roxa.png" id="1_wo8ci"]
[ext_resource type="Texture2D" uid="uid://83i685dpkq4y" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/pocao_rosa.png" id="2_d04la"]
[ext_resource type="Texture2D" uid="uid://wgcpsoln6a0j" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/pocao_verde.png" id="3_c2pbv"]
[ext_resource type="Texture2D" uid="uid://bfkwcn2ny1gev" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/pocao_amarela.png" id="4_w6168"]
[ext_resource type="AudioStream" uid="uid://41oilyxa32sf" path="res://microjogos/2025S1/fast_food_pocao/recursos/sons/feitico.wav" id="7_2e2rv"]
[ext_resource type="Texture2D" uid="uid://dna37k7iryy2f" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/watercolor-painting-flower-medieval-lace-picture-frame-8fe2e2f04f064b52337c04403cb2dfe5.png" id="7_e21le"]
[ext_resource type="Texture2D" uid="uid://yscly2hyuxc0" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/potion_mix.png" id="8_e21le"]
[ext_resource type="Texture2D" uid="uid://lx2jxqvs7yfa" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/cauderao.png" id="8_r1hvl"]
[ext_resource type="Script" uid="uid://ys55u4bswdaa" path="res://microjogos/2025S1/fast_food_pocao/cenas/scripts/potion_mix.gd" id="9_d75xv"]
[ext_resource type="AudioStream" uid="uid://byrw82vcbq67n" path="res://microjogos/2025S1/fast_food_pocao/recursos/sons/ganhou.wav" id="9_r1hvl"]
[ext_resource type="Theme" path="res://principal/recursos/themes/TitleTheme.tres" id="10_c3ime"]
[ext_resource type="Texture2D" uid="uid://bgfyrk5qr8xo0" path="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/background.png" id="11_mljui"]
[ext_resource type="AudioStream" uid="uid://cnuteh5snrl8i" path="res://microjogos/2025S1/fast_food_pocao/recursos/sons/perdeu.wav" id="12_e21le"]

[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_upifg"]
texture_margin_left = 200.0
texture_margin_top = 200.0
texture_margin_right = 200.0
texture_margin_bottom = 200.0

[sub_resource type="Theme" id="Theme_mljui"]
Button/styles/focus = SubResource("StyleBoxTexture_upifg")

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_e21le"]
bg_color = Color(0.870246, 0.745006, 0.579849, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(0.429106, 0.25807, 0.0725015, 1)
corner_radius_top_left = 50
corner_radius_top_right = 50
corner_radius_bottom_right = 50
corner_radius_bottom_left = 50
shadow_color = Color(0, 0, 0, 0.380392)
shadow_size = 10
shadow_offset = Vector2(5, 5)

[node name="Main" type="Control"]
texture_filter = 1
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_soe26")
roxo = ExtResource("1_wo8ci")
rosa = ExtResource("2_d04la")
verde = ExtResource("3_c2pbv")
amarelo = ExtResource("4_w6168")

[node name="Fundo" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -960.0
offset_top = -540.0
offset_right = 960.0
offset_bottom = 540.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("11_mljui")

[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 50
theme_override_constants/margin_top = 50
theme_override_constants/margin_right = 50
theme_override_constants/margin_bottom = 50

[node name="Roxo" type="TextureButton" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 0
focus_neighbor_right = NodePath("../Rosa")
focus_neighbor_bottom = NodePath("../Verde")
mouse_filter = 2
theme = SubResource("Theme_mljui")
texture_normal = ExtResource("1_wo8ci")
texture_focused = ExtResource("7_e21le")

[node name="Rosa" type="TextureButton" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 0
focus_neighbor_left = NodePath("../Roxo")
focus_neighbor_bottom = NodePath("../Amarelo")
mouse_filter = 2
theme = SubResource("Theme_mljui")
texture_normal = ExtResource("2_d04la")
texture_focused = ExtResource("7_e21le")

[node name="Verde" type="TextureButton" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 0
size_flags_vertical = 8
focus_neighbor_top = NodePath("../Roxo")
focus_neighbor_right = NodePath("../Amarelo")
mouse_filter = 2
theme = SubResource("Theme_mljui")
texture_normal = ExtResource("3_c2pbv")
texture_focused = ExtResource("7_e21le")

[node name="Amarelo" type="TextureButton" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 8
size_flags_vertical = 8
focus_neighbor_left = NodePath("../Verde")
focus_neighbor_top = NodePath("../Rosa")
mouse_filter = 2
theme = SubResource("Theme_mljui")
texture_normal = ExtResource("4_w6168")
texture_focused = ExtResource("7_e21le")

[node name="PanelContainer" type="PanelContainer" parent="MarginContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
theme_override_styles/panel = SubResource("StyleBoxFlat_e21le")

[node name="Receita" type="HBoxContainer" parent="MarginContainer/PanelContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
theme_override_constants/separation = -20

[node name="PotionMix" type="Sprite2D" parent="."]
modulate = Color(0.254491, 0.359805, 0.605623, 1)
position = Vector2(960, 833.25)
scale = Vector2(0.5, 0.5)
texture = ExtResource("8_e21le")
script = ExtResource("9_d75xv")

[node name="Cauderao" type="Sprite2D" parent="."]
position = Vector2(960, 833.25)
scale = Vector2(0.5, 0.5)
texture = ExtResource("8_r1hvl")

[node name="feitico" type="AudioStreamPlayer" parent="."]
stream = ExtResource("7_2e2rv")

[node name="perdeu" type="AudioStreamPlayer" parent="."]
stream = ExtResource("12_e21le")

[node name="ganhou" type="AudioStreamPlayer" parent="."]
stream = ExtResource("9_r1hvl")

[node name="Perdeu" type="Label" parent="."]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -666.5
offset_top = -123.5
offset_right = 666.5
offset_bottom = 123.5
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("10_c3ime")
text = "Você perdeu!"
horizontal_alignment = 1
vertical_alignment = 1

[node name="Ganhou" type="Label" parent="."]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -666.5
offset_top = -123.5
offset_right = 666.5
offset_bottom = 123.5
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("10_c3ime")
text = "Você ganhou!"
horizontal_alignment = 1
vertical_alignment = 1
75 changes: 75 additions & 0 deletions microjogos/2025S1/fast_food_pocao/cenas/scripts/main.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
extends Control

# Declaração dos sinais win e lose

signal win
signal lose

# Estas constantes são usadas para determinar o tamanho da tela do seu jogo. Por padrão, definem uma
# tela 1920x1080, que é padrão para monitores full HD. Caso você queira uma resolução menor para
# atingir uma estética mais pixelada, você pode mudar estes números para qualquer outra resolução
# 16:9
const WIDTH = 1920
const HEIGHT = 1080

@export var roxo : CompressedTexture2D
@export var rosa : CompressedTexture2D
@export var verde : CompressedTexture2D
@export var amarelo : CompressedTexture2D

# --------------------------------------------------------------------------------------------------
# FUNÇÕES PADRÃO
# --------------------------------------------------------------------------------------------------
var receita = ["Roxo", "Rosa", "Verde", "Amarelo"]

# Esta função é chamada assim que esta cena é instanciada, ou seja, assim que seu minigame inicia
func _ready():
var roxo_button = $MarginContainer/Roxo
var rosa_button = $MarginContainer/Rosa
var verde_button = $MarginContainer/Verde
var amarelo_button = $MarginContainer/Amarelo

roxo_button.pressed.connect(escolher_pocao.bind(roxo_button))
rosa_button.pressed.connect(escolher_pocao.bind(rosa_button))
verde_button.pressed.connect(escolher_pocao.bind(verde_button))
amarelo_button.pressed.connect(escolher_pocao.bind(amarelo_button))
$MarginContainer/Roxo.grab_focus()

receita.shuffle()
receita = receita.slice(0,3)
for pocao in receita:
var texture_rect = TextureRect.new()
match pocao:
"Roxo": texture_rect.texture = roxo
"Rosa": texture_rect.texture = rosa
"Verde": texture_rect.texture = verde
"Amarelo": texture_rect.texture = amarelo
%Receita.add_child(texture_rect)


# Chame esta função para registrar que o jogador venceu o jogo
func register_win():
emit_signal("win")


# Chame esta função para registrar que o jogador perdeu o jogo
func register_lose():
emit_signal("lose")


func escolher_pocao(id: Variant) -> void:
if len(receita)>0:
if receita[0] == id.name:
receita.remove_at(0)
if len(receita)==0:
register_win()
$ganhou.play()
$Ganhou.show()
else:
$feitico.play()
else:
$perdeu.play()
$Perdeu.show()
register_lose()
receita = []
$PotionMix.add_potion(id.name)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://b5qmw60c4xfj
8 changes: 8 additions & 0 deletions microjogos/2025S1/fast_food_pocao/cenas/scripts/potion_mix.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends Sprite2D

func add_potion(potion:String):
match potion:
"Roxo": modulate = modulate.lerp(Color.from_rgba8(125, 70, 200), 0.5)
"Rosa": modulate = modulate.lerp(Color.from_rgba8(250, 100, 190), 0.5)
"Verde": modulate = modulate.lerp(Color.from_rgba8(130, 180, 70), 0.5)
"Amarelo": modulate = modulate.lerp(Color.from_rgba8(250, 150, 50), 0.5)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://ys55u4bswdaa
29 changes: 29 additions & 0 deletions microjogos/2025S1/fast_food_pocao/microgame.tres
Comment thread
ayudaV marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[gd_resource type="Resource" script_class="MicrogameAsset" load_steps=4 format=3 uid="uid://dlpkjlx141r5w"]

[ext_resource type="Texture2D" uid="uid://db0lquq5yyqig" path="res://microjogos/2025S1/fast_food_pocao/capa.png" id="1_jc046"]
[ext_resource type="PackedScene" uid="uid://cw7bb6dljqkxg" path="res://microjogos/2025S1/fast_food_pocao/cenas/main.tscn" id="2_b74mo"]
[ext_resource type="Script" uid="uid://bus1nknp6xsc0" path="res://principal/microgame_asset.gd" id="3_5qxqd"]

[resource]
script = ExtResource("3_5qxqd")
cover = ExtResource("1_jc046")
title_pt = &"Fast Food Poção"
title_en = &"Fast Food Potion"
credits_pt = "Feito por: Vitória Gabriela Meneses da Silva

Créditos:
https://www.freepik.com/free-vector/cauldron-vector-icon_189983328.htm
https://pixabay.com/illustrations/forest-mountains-night-sky-5375005/
https://www.hiclipart.com/free-transparent-background-png-clipart-ifijx
https://www.freepik.com/free-vector/elixir-bottles-set_9174576.htm"
credits_en = "Made by: Vitória Gabriela Meneses da Silva

Credits:
https://www.freepik.com/free-vector/cauldron-vector-icon_189983328.htm
https://pixabay.com/illustrations/forest-mountains-night-sky-5375005/
https://www.hiclipart.com/free-transparent-background-png-clipart-ifijx
https://www.freepik.com/free-vector/elixir-bottles-set_9174576.htm"
start_message_pt = &"Faça a Poção"
start_message_en = &"Make the Potion"
main_scene = ExtResource("2_b74mo")
difficulty = 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bgfyrk5qr8xo0"
path="res://.godot/imported/background.png-9a6818287a629e625ad8f7392f1ee2e1.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2025S1/fast_food_pocao/recursos/imagens/background.png"
dest_files=["res://.godot/imported/background.png-9a6818287a629e625ad8f7392f1ee2e1.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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading