Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lucas' s project #114

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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/2024S1/projeto-do-lucas/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/2024S1/projeto-do-lucas/capa.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

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

[deps]

source_file="res://microjogos/2024S1/projeto-do-lucas/capa.png"
dest_files=["res://.godot/imported/capa.png-5f1fe5e601801e2f9d0c6ce530edcb4a.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
9 changes: 9 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Background.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends Sprite2D

# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
Empty file.
21 changes: 21 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Model_Bottom.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends Area2D

var bottom = "bottom"
var is_in_bottom = false
func _ready():
add_to_group(bottom)

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_just_pressed("acao") and is_in_bottom:
await get_tree().create_timer(0.1).timeout
$Model_Sprite_Bottom.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_005_AWAKE.png")
pass

func _on_player_focus_area_entered(area):
if area.is_in_group(bottom):
$Model_Sprite_Bottom.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_004_MODEL_FOCUS.png")
is_in_bottom = true

func _on_player_focus_area_exited(area):
$Model_Sprite_Bottom.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_003_MODEL.png")
21 changes: 21 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Model_Ceiling.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends Area2D

var ceiling = "ceiling"
var is_in_ceiling = false
func _ready():
add_to_group(ceiling)

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_just_pressed("acao") and is_in_ceiling:
await get_tree().create_timer(0.1).timeout
$Model_Sprite_Ceiling.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_005_AWAKE.png")
pass

func _on_player_focus_area_entered(area):
if area.is_in_group(ceiling):
$Model_Sprite_Ceiling.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_004_MODEL_FOCUS.png")
is_in_ceiling = true

func _on_player_focus_area_exited(area):
$Model_Sprite_Ceiling.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_003_MODEL.png")
21 changes: 21 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Model_Side.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
extends Area2D

var side = "side"
var is_in_side = false
func _ready():
add_to_group(side)

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if Input.is_action_just_pressed("acao") and is_in_side:
await get_tree().create_timer(0.1).timeout
$Model_Sprite_Side.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_005_AWAKE.png")
pass

func _on_player_focus_area_entered(area):
if area.is_in_group(side):
$Model_Sprite_Side.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_004_MODEL_FOCUS.png")
is_in_side = true

func _on_player_focus_area_exited(area):
$Model_Sprite_Side.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_003_MODEL.png")
11 changes: 11 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Model_Sprite.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends Sprite2D


# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
29 changes: 29 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Player.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
extends CharacterBody2D

@export var speed = 200
var camera = Camera2D

func get_input():
var input_direction = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
velocity = input_direction * speed

func _process(delta):
if Input.is_action_just_pressed("acao") and speed != 0:
$Sound_Camera.play()
await get_tree().create_timer(0.1).timeout
speed = 0
camera_flash()
pass

func camera_flash():
$Player_Sprite.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_FLASH.png")
$Player_Sprite_Idle.queue_free()
camera_polaroid()

func camera_polaroid():
await get_tree().create_timer(0.4).timeout
$Player_Sprite.texture = load("res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_POLAROID.png")

func _physics_process(delta):
get_input()
move_and_slide()
11 changes: 11 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Player_Camera.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
extends CharacterBody2D

@export var speed = 300

func get_input():
var input_direction = Input.get_vector("ui_left", "ui_right", "ui_up", "ui_down")
velocity = input_direction * speed

func _physics_process(delta):
get_input()
move_and_slide()
9 changes: 9 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/Player_Focus.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends Area2D

# Called when the node enters the scene tree for the first time.
func _ready():
pass

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
1 change: 1 addition & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/cenas.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Coloque suas cenas aqui! A cena que vai rodar no jogo deve necessariamente ser a Main.tscn
194 changes: 194 additions & 0 deletions microjogos/2024S1/projeto-do-lucas/cenas/main.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
[gd_scene load_steps=20 format=3 uid="uid://bi0ahd7cv37i6"]

[ext_resource type="Script" path="res://microjogos/2024S1/projeto-do-lucas/cenas/scripts/main.gd" id="1_7xlnu"]
[ext_resource type="Script" path="res://microjogos/2024S1/projeto-do-lucas/cenas/Player.gd" id="1_40en8"]
[ext_resource type="Texture2D" uid="uid://brsax1e5qansx" path="res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_BACKGROUND.jpg" id="1_e3r4q"]
[ext_resource type="Texture2D" uid="uid://6o83broaecee" path="res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_001_PLAYER.png" id="2_ldxb5"]
[ext_resource type="Texture2D" uid="uid://b5p0xe8eevy7j" path="res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_002_PLAYER.png" id="3_e65vq"]
[ext_resource type="Texture2D" uid="uid://djgwdax00j8j" path="res://microjogos/2024S1/projeto-do-lucas/recursos/IMG_003_MODEL.png" id="5_k2n1i"]
[ext_resource type="Script" path="res://microjogos/2024S1/projeto-do-lucas/cenas/Model_Ceiling.gd" id="5_vr3oo"]
[ext_resource type="Script" path="res://microjogos/2024S1/projeto-do-lucas/cenas/Model_Bottom.gd" id="7_jutc1"]
[ext_resource type="AudioStream" uid="uid://cicbgmaedvytx" path="res://microjogos/2024S1/projeto-do-lucas/recursos/SFX_CAMERA.ogg" id="7_scer6"]
[ext_resource type="Script" path="res://microjogos/2024S1/projeto-do-lucas/cenas/Model_Side.gd" id="8_vrlp4"]
[ext_resource type="AudioStream" uid="uid://dyjewg2k1ktn2" path="res://microjogos/2024S1/projeto-do-lucas/recursos/SFX_CAVE.ogg" id="10_oxega"]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_4lb7o"]
size = Vector2(480, 277)

[sub_resource type="CircleShape2D" id="CircleShape2D_hflmh"]
radius = 66.0303

[sub_resource type="SpriteFrames" id="SpriteFrames_jac1k"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("2_ldxb5")
}, {
"duration": 1.0,
"texture": ExtResource("3_e65vq")
}],
"loop": true,
"name": &"Idle",
"speed": 2.0
}]

[sub_resource type="RectangleShape2D" id="RectangleShape2D_qcweo"]
size = Vector2(1919.25, 26.005)

[sub_resource type="RectangleShape2D" id="RectangleShape2D_y528w"]
size = Vector2(1080, 26.25)

[sub_resource type="CircleShape2D" id="CircleShape2D_8y56r"]
radius = 35.4684

[sub_resource type="CircleShape2D" id="CircleShape2D_xtnxu"]
radius = 27.6797

[sub_resource type="CircleShape2D" id="CircleShape2D_qdcmn"]
radius = 16.8517

[node name="Main" type="Node2D"]
script = ExtResource("1_7xlnu")

[node name="Sound_Cave" type="AudioStreamPlayer2D" parent="."]
position = Vector2(-6.10352e-05, -6.10352e-05)
scale = Vector2(1, 1)
stream = ExtResource("10_oxega")
volume_db = 12.0

[node name="Background" type="Sprite2D" parent="."]
z_index = -1
position = Vector2(960, 540)
scale = Vector2(0.274286, 0.39373)
texture = ExtResource("1_e3r4q")

[node name="Player" type="CharacterBody2D" parent="."]
position = Vector2(340, 83)
script = ExtResource("1_40en8")

[node name="Player_Collision" type="CollisionShape2D" parent="Player"]
position = Vector2(621, 404)
scale = Vector2(2, 2)
shape = SubResource("RectangleShape2D_4lb7o")
debug_color = Color(0, 0.6, 0.701961, 0.419608)

[node name="Player_Focus" type="Area2D" parent="Player"]

[node name="Player_Focus_Collision" type="CollisionShape2D" parent="Player/Player_Focus"]
z_index = 3
position = Vector2(630, 405)
shape = SubResource("CircleShape2D_hflmh")
debug_color = Color(0.901961, 0.654902, 0.717647, 0.419608)

[node name="Player_Camera" type="Camera2D" parent="Player"]
position = Vector2(620.88, 404)
zoom = Vector2(2, 1.95)
limit_left = 0
limit_top = 0
limit_right = 1920
limit_bottom = 1080
editor_draw_limits = true

[node name="Player_Sprite" type="Sprite2D" parent="Player"]
z_index = 3
position = Vector2(621, 404)

[node name="Player_Sprite_Idle" type="AnimatedSprite2D" parent="Player"]
z_index = 2
texture_filter = 1
position = Vector2(621, 404)
scale = Vector2(1.36, 1.36)
sprite_frames = SubResource("SpriteFrames_jac1k")
animation = &"Idle"
autoplay = "Idle"

[node name="Sound_Camera" type="AudioStreamPlayer2D" parent="Player"]
stream = ExtResource("7_scer6")
volume_db = 20.0

[node name="Boundaries" type="StaticBody2D" parent="."]
position = Vector2(959.5, 8.99744)

[node name="Top_Boundary" type="CollisionShape2D" parent="Boundaries"]
position = Vector2(0.250061, -21.9974)
shape = SubResource("RectangleShape2D_qcweo")

[node name="Bottom_Boundary" type="CollisionShape2D" parent="Boundaries"]
position = Vector2(0.875061, 1084)
shape = SubResource("RectangleShape2D_qcweo")

[node name="Left_Boundary" type="CollisionShape2D" parent="Boundaries"]
position = Vector2(-972.5, 531.003)
rotation = 1.57079
shape = SubResource("RectangleShape2D_y528w")

[node name="Right_Boundary" type="CollisionShape2D" parent="Boundaries"]
position = Vector2(973.5, 531.003)
rotation = 1.57079
shape = SubResource("RectangleShape2D_y528w")

[node name="Model_Ceiling" type="Area2D" parent="."]
script = ExtResource("5_vr3oo")

[node name="Model_Focus_Collision" type="CollisionShape2D" parent="Model_Ceiling"]
z_index = 1
position = Vector2(1354, 248)
rotation = 2.09439
shape = SubResource("CircleShape2D_8y56r")
debug_color = Color(0.964706, 0, 0.486275, 0.419608)

[node name="Model_Sprite_Ceiling" type="Sprite2D" parent="Model_Ceiling"]
texture_filter = 1
position = Vector2(1360, 232)
rotation = -2.76974
scale = Vector2(0.827872, 1.21724)
texture = ExtResource("5_k2n1i")

[node name="Model_Bottom" type="Area2D" parent="."]
position = Vector2(1361.13, 237.568)
rotation = -2.76974
scale = Vector2(0.766328, 1.25126)
script = ExtResource("7_jutc1")

[node name="Model_Focus_Collision" type="CollisionShape2D" parent="Model_Bottom"]
light_mask = 2
z_index = 1
position = Vector2(-326.388, -297.279)
scale = Vector2(1.50636, 0.97728)
shape = SubResource("CircleShape2D_xtnxu")
debug_color = Color(0.964706, 0, 0.486275, 0.419608)

[node name="Model_Sprite_Bottom" type="Sprite2D" parent="Model_Bottom"]
texture_filter = 1
position = Vector2(-329.753, -296.179)
rotation = 1.27111
scale = Vector2(0.60621, 1.44913)
skew = 0.120428
texture = ExtResource("5_k2n1i")

[node name="Model_Side" type="Area2D" parent="."]
position = Vector2(466, 489)
scale = Vector2(1.57516, 2.13483)
script = ExtResource("8_vrlp4")

[node name="CollisionShape2D" type="CollisionShape2D" parent="Model_Side"]
z_index = 1
position = Vector2(1.2696, 0.936843)
scale = Vector2(1.35834, 1)
shape = SubResource("CircleShape2D_qdcmn")
debug_color = Color(0.964706, 0, 0.486275, 0.419608)

[node name="Model_Sprite_Side" type="Sprite2D" parent="Model_Side"]
texture_filter = 1
position = Vector2(-5.33244, 0.39412)
rotation = 1.83259
scale = Vector2(0.419723, 0.694187)
skew = -0.114022
texture = ExtResource("5_k2n1i")

[connection signal="area_entered" from="Player/Player_Focus" to="Model_Ceiling" method="_on_player_focus_area_entered"]
[connection signal="area_entered" from="Player/Player_Focus" to="Model_Bottom" method="_on_player_focus_area_entered"]
[connection signal="area_entered" from="Player/Player_Focus" to="Model_Side" method="_on_player_focus_area_entered"]
[connection signal="area_exited" from="Player/Player_Focus" to="Model_Ceiling" method="_on_player_focus_area_exited"]
[connection signal="area_exited" from="Player/Player_Focus" to="Model_Bottom" method="_on_player_focus_area_exited"]
[connection signal="area_exited" from="Player/Player_Focus" to="Model_Side" method="_on_player_focus_area_exited"]
Loading