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

Projeto de victor #124

Open
wants to merge 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bkvcg7ivmjl0d"
path="res://.godot/imported/capa.png-8a1b289eccd6e7f3202cf5a91f689be2.ctex"
path="res://.godot/imported/capa.png-fe3ab1710c7bc4ea25c5b4a664331970.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://microjogos/2024S1/seu_projeto/capa.png"
dest_files=["res://.godot/imported/capa.png-8a1b289eccd6e7f3202cf5a91f689be2.ctex"]
source_file="res://microjogos/2024S1/projeto-faroeste/capa.png"
dest_files=["res://.godot/imported/capa.png-fe3ab1710c7bc4ea25c5b4a664331970.ctex"]

[params]

Expand Down
3 changes: 3 additions & 0 deletions microjogos/2024S1/projeto-faroeste/cenas/CharacterBody2D.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends CharacterBody2D


12 changes: 12 additions & 0 deletions microjogos/2024S1/projeto-faroeste/cenas/TempoReacao.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends Timer



func _ready():

func _process(delta):





15 changes: 15 additions & 0 deletions microjogos/2024S1/projeto-faroeste/cenas/Timer.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
extends Timer


func _ready():

func _process(delta):









58 changes: 58 additions & 0 deletions microjogos/2024S1/projeto-faroeste/cenas/main.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
extends Node2D

signal win
signal lose

const WIDTH = 240
const HEIGHT = 135
var tempoativo = 1
var vitoria = 1
func _ready():
var anEU = get_node("Player/parado1")
anEU.play()
var anBA = get_node("Inimigo/parado2")
anBA.play()

var intro = get_node("TempoIntro")
intro.start(randf_range(3,5))

"_on_tempo_intro_timeout()
_on_sprite_timeout()"
func _physics_process(delta):
if Input.is_action_just_pressed("acao") and tempoativo == 2 and vitoria == 1:
get_node("Player/parado1").visible = false
get_node("Player/tiro1").visible = true
var tiro1 = get_node("Player/tiro1")
tiro1.play()
emit_signal("win")
vitoria = 3
elif Input.is_action_just_pressed("acao") and vitoria == 2 and tempoativo == 1:
get_node("Inimigo/parado2").visible = false
get_node("Inimigo/tiro2").visible = true
var tiro2 = get_node("Inimigo/tiro2")
tiro2.play()
emit_signal("lose")

func _on_tempo_intro_timeout():
get_node("atire").visible = true
get_node("sino").play()

var sprite = get_node("TempoIntro/sprite")
sprite.start(0.5)
tempoativo = 2
func _on_sprite_timeout():
tempoativo = 2
get_node("atire").visible = false

var reacao = get_node("TempoIntro/TempoReacao")
reacao.start(0.3)

func _on_tempo_reacao_timeout():
tempoativo = 1
vitoria = 2






Loading