This commit is contained in:
betalars 2025-05-10 15:59:52 +02:00
parent e324eba12d
commit 60e0335353
2 changed files with 14 additions and 13 deletions

View File

@ -490,7 +490,7 @@ tracks/12/path = NodePath("../../..")
tracks/12/interp = 1 tracks/12/interp = 1
tracks/12/loop_wrap = true tracks/12/loop_wrap = true
tracks/12/keys = { tracks/12/keys = {
"times": PackedFloat32Array(43.5333, 92.4031, 125.533, 155.167, 179.133, 181.935, 209.834, 233.467), "times": PackedFloat32Array(43.5333, 92.4031, 133.733, 155.167, 179.133, 181.935, 209.834, 233.467),
"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1), "transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1),
"values": [{ "values": [{
"args": [], "args": [],
@ -811,16 +811,15 @@ clip_children = 2
scale = Vector2(0.6, 0.6) scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_liwtr") sprite_frames = SubResource("SpriteFrames_liwtr")
script = SubResource("GDScript_80sa6") script = SubResource("GDScript_80sa6")
noise_speed = 0.0 noise_speed = 9.21962
noise_power = 5.0 noise_power = 0.3
[node name="GPUParticles2D" type="GPUParticles2D" parent="PanelContainer/card/BackgroundSprite"] [node name="GPUParticles2D" type="GPUParticles2D" parent="PanelContainer/card/BackgroundSprite"]
emitting = false amount = 500
amount = 1
texture = ExtResource("6_0qiyf") texture = ExtResource("6_0qiyf")
lifetime = 5.0 lifetime = 3.99993
one_shot = true speed_scale = 1.01248
explosiveness = 0.29 explosiveness = 0.741887
randomness = 0.14 randomness = 0.14
local_coords = true local_coords = true
process_material = SubResource("ParticleProcessMaterial_jikd6") process_material = SubResource("ParticleProcessMaterial_jikd6")

View File

@ -61,7 +61,7 @@ func _ready():
Scenes.sign_up_for_sequence(pick_cards, id, 1) Scenes.sign_up_for_sequence(pick_cards, id, 1)
if get_tree().root == self.get_parent(): if get_tree().root == self.get_parent():
pick_cards(0, false) pick_cards(3, false)
State.take_stage(self) State.take_stage(self)
reset() reset()
@ -178,14 +178,13 @@ func pick(id: int):
var winning_id var winning_id
print("Randomly selected card %s" % options[1].text) print("Randomly selected card %s" % options[1].text)
if !(options[1].text == "void" and not id == 1): if not current_scene_id == Scenes.id.YOUTH_JUI_JUTSU:
randomize() randomize()
winning_id = randi() % options.size() winning_id = randi() % options.size()
else: else:
winning_id = 2 if id == 0 else 0 winning_id = 2 if id == 0 else 0
Steam.setAchievement("FIGHT_BACK") #Steam.setAchievement("FIGHT_BACK")
Steam.storeStats() #Steam.storeStats()
output.append(options.pop_at(winning_id)) output.append(options.pop_at(winning_id))
random_player = anim_players[winning_id] random_player = anim_players[winning_id]
@ -236,7 +235,10 @@ func handle_mouse_button(button_event: InputEventMouseButton, new_selection: Nod
if button_event.button_index == MOUSE_BUTTON_LEFT and button_event.pressed: if button_event.button_index == MOUSE_BUTTON_LEFT and button_event.pressed:
pick(options.find(new_selection)) pick(options.find(new_selection))
var current_scene_id
func pick_cards(id: int, repeat: bool): func pick_cards(id: int, repeat: bool):
current_scene_id = id
print("Reached actor %s in sequence %s. Is%s repeating." % [name, Scenes.id.keys()[id], " not" if repeat else ""]) print("Reached actor %s in sequence %s. Is%s repeating." % [name, Scenes.id.keys()[id], " not" if repeat else ""])
if not repeat: if not repeat:
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE Input.mouse_mode = Input.MOUSE_MODE_VISIBLE