game gaming
This commit is contained in:
parent
c000461fd6
commit
d48ac7b9fd
3 changed files with 13 additions and 9 deletions
|
|
@ -15,8 +15,8 @@ signal game_over(score : int)
|
|||
@export var games : Array[PackedScene]
|
||||
@export var zoom_speed : float = 0.5
|
||||
@export_group("Channel Rules")
|
||||
@export var target_channels : float = 1.5
|
||||
@export var channel_growth_per_min : float = 4
|
||||
@export var target_channels : float = 1
|
||||
@export var channel_growth_per_min : float = 0.8
|
||||
|
||||
@export_group("Node References")
|
||||
@export var main_camera : Camera2D
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=16 format=3 uid="uid://ct8axfbvd2wn4"]
|
||||
[gd_scene load_steps=17 format=3 uid="uid://ct8axfbvd2wn4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d2q6xfk8htbyy" path="res://game_logic.gd" id="1_j5hk1"]
|
||||
[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"]
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
[ext_resource type="PackedScene" uid="uid://drk2fwkv816qv" path="res://games/crafting/crafting.tscn" id="9_udeyl"]
|
||||
[ext_resource type="Texture2D" uid="uid://baf30tscdkl0i" path="res://sprites/tv_remote.png" id="11_j5hk1"]
|
||||
[ext_resource type="Script" uid="uid://ca41i40uerrbr" path="res://games/platformer/platformer_channel.gd" id="11_mlphb"]
|
||||
[ext_resource type="PackedScene" uid="uid://bcu5svl5gjd4r" path="res://games/reaction/reaction.tscn" id="11_opqoc"]
|
||||
[ext_resource type="Script" uid="uid://dgq2y6wjlye6" path="res://chatboxController.gd" id="11_ueiaa"]
|
||||
[ext_resource type="Script" uid="uid://dnptjh111yd8i" path="res://itemPopup.gd" id="12_daj04"]
|
||||
|
||||
|
|
@ -94,8 +95,8 @@ channel_scene = ExtResource("7_6e45b")
|
|||
|
||||
[node name="Control8" parent="GridContainer" instance=ExtResource("1_mlf6e")]
|
||||
layout_mode = 2
|
||||
channel_name = "Space Invaders"
|
||||
channel_scene = ExtResource("9_miq82")
|
||||
channel_name = "Reaction"
|
||||
channel_scene = ExtResource("11_opqoc")
|
||||
|
||||
[node name="Control7" parent="GridContainer" instance=ExtResource("1_mlf6e")]
|
||||
layout_mode = 2
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ extends Node
|
|||
signal game_win
|
||||
signal game_lose
|
||||
|
||||
@export var reaction_window : float = 1
|
||||
@export var grace : float = 3
|
||||
@export var reaction_window : float = 1.5
|
||||
@export_group("Node References")
|
||||
@export var prepare_node : Control
|
||||
@export var press_node : Control
|
||||
|
|
@ -20,6 +21,7 @@ func _ready() -> void:
|
|||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
time_remaining -= delta
|
||||
grace -= delta
|
||||
prepare_node.visible = time_remaining > 0
|
||||
press_node.visible = time_remaining <= 0
|
||||
if(time_remaining <= 0):
|
||||
|
|
@ -30,9 +32,10 @@ func _process(delta: float) -> void:
|
|||
game_win.emit()
|
||||
#winner
|
||||
else:
|
||||
print("reaction lose")
|
||||
game_lose.emit()
|
||||
#loser
|
||||
if(grace <= 0):
|
||||
print("reaction lose")
|
||||
game_lose.emit()
|
||||
#loser
|
||||
if(reaction_window <= 0):
|
||||
print("reaction lose")
|
||||
game_lose.emit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue