Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
12b02877bb | |||
3450c463f9 | |||
e3545a5087 |
36
arrow/arrow.gd
Normal file
36
arrow/arrow.gd
Normal file
@ -0,0 +1,36 @@
|
||||
extends RigidBody2D
|
||||
|
||||
@onready var area_2d: Area2D = $Area2D
|
||||
@onready var kill_after: Timer = $KillAfter
|
||||
|
||||
@export var speed = 100
|
||||
@export var rotation_speed = 1
|
||||
@export var jump_strength_on_death = 100
|
||||
var is_moving = true
|
||||
var first_frame_available = true
|
||||
|
||||
func _ready() -> void:
|
||||
freeze = true
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if is_moving:
|
||||
position.x -= speed
|
||||
else:
|
||||
freeze = false
|
||||
area_2d.monitoring = false
|
||||
area_2d.monitorable = false
|
||||
|
||||
linear_velocity.x = 0
|
||||
linear_velocity += get_gravity() * delta
|
||||
angular_velocity = rotation_speed
|
||||
|
||||
if first_frame_available:
|
||||
apply_impulse(Vector2.UP * jump_strength_on_death)
|
||||
first_frame_available = false
|
||||
|
||||
func _on_kill_after_timeout() -> void:
|
||||
queue_free()
|
||||
|
||||
func _on_body_entered(body: Node) -> void:
|
||||
is_moving = false
|
||||
kill_after.start()
|
1
arrow/arrow.gd.uid
Normal file
1
arrow/arrow.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://127t4dvlp6tv
|
48
arrow/arrow.tscn
Normal file
48
arrow/arrow.tscn
Normal file
@ -0,0 +1,48 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://4bfkbcr7v8tj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://127t4dvlp6tv" path="res://arrow/arrow.gd" id="1_d2qln"]
|
||||
[ext_resource type="Script" uid="uid://dt2lsk3je41th" path="res://damageable/hitbox.gd" id="2_d2qln"]
|
||||
[ext_resource type="Texture2D" uid="uid://lhq6h8f81qrr" path="res://player/assets/Fleche.png" id="2_ofxgm"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_d2qln"]
|
||||
size = Vector2(2, 2)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yaehf"]
|
||||
size = Vector2(12, 5)
|
||||
|
||||
[node name="Arrow" type="RigidBody2D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 0
|
||||
freeze_mode = 1
|
||||
linear_velocity = Vector2(-100, 0)
|
||||
script = ExtResource("1_d2qln")
|
||||
speed = 1
|
||||
rotation_speed = 10
|
||||
jump_strength_on_death = 500
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_d2qln")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = ExtResource("2_ofxgm")
|
||||
region_rect = Rect2(717, 6, 35, 9)
|
||||
|
||||
[node name="Area2D" type="Area2D" parent="."]
|
||||
collision_layer = 4
|
||||
collision_mask = 5
|
||||
script = ExtResource("2_d2qln")
|
||||
hitback_direction = Vector2(-1, -1)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
|
||||
position = Vector2(1, 0.5)
|
||||
shape = SubResource("RectangleShape2D_yaehf")
|
||||
|
||||
[node name="KillAfter" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
one_shot = true
|
||||
ignore_time_scale = true
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="body_entered" from="Area2D" to="." method="_on_body_entered"]
|
||||
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]
|
||||
[connection signal="timeout" from="KillAfter" to="." method="_on_kill_after_timeout"]
|
10
arrow/arrow_spawner.gd
Normal file
10
arrow/arrow_spawner.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Node2D
|
||||
|
||||
@export var arrow_scene: PackedScene
|
||||
@onready var spawn_timing: Timer = $SpawnTiming
|
||||
|
||||
|
||||
func _on_spawn_timing_timeout() -> void:
|
||||
var arrow: Node2D = arrow_scene.instantiate()
|
||||
arrow.global_position = global_position
|
||||
add_sibling(arrow)
|
1
arrow/arrow_spawner.gd.uid
Normal file
1
arrow/arrow_spawner.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://bej0paudsyd7h
|
14
arrow/arrow_spawner.tscn
Normal file
14
arrow/arrow_spawner.tscn
Normal file
@ -0,0 +1,14 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://c5tp7c70qkxe3"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bej0paudsyd7h" path="res://arrow/arrow_spawner.gd" id="1_7je20"]
|
||||
[ext_resource type="PackedScene" uid="uid://4bfkbcr7v8tj" path="res://arrow/arrow.tscn" id="2_ek028"]
|
||||
|
||||
[node name="ArrowSpawner" type="Node2D"]
|
||||
script = ExtResource("1_7je20")
|
||||
arrow_scene = ExtResource("2_ek028")
|
||||
|
||||
[node name="SpawnTiming" type="Timer" parent="."]
|
||||
wait_time = 3.0
|
||||
autostart = true
|
||||
|
||||
[connection signal="timeout" from="SpawnTiming" to="." method="_on_spawn_timing_timeout"]
|
90
dialogues/choice.gd
Normal file
90
dialogues/choice.gd
Normal file
@ -0,0 +1,90 @@
|
||||
extends Node
|
||||
|
||||
@onready var bubbles: HBoxContainer = %Bubbles
|
||||
@onready var bubbles_back: TileMapLayer = %BubblesBack
|
||||
@onready var bubbles_interior: TileMapLayer = %BubblesInterior
|
||||
@onready var bubble_label: RichTextLabel = %BubbleLabel
|
||||
|
||||
@onready var ui_flicker_timer: Timer = $UIFlickerTimer
|
||||
@onready var e_ui_button: TextureRect = %E
|
||||
@onready var next_label: Label = %NextLabel
|
||||
|
||||
@onready var choices_container: MarginContainer = %ChoicesContainer
|
||||
@onready var accept_indicator: ColorRect = %AcceptIndicator
|
||||
@onready var accept_label: Label = %AcceptLabel
|
||||
@onready var reject_indicator: ColorRect = %RejectIndicator
|
||||
@onready var reject_label: Label = %RejectLabel
|
||||
|
||||
@export_multiline var choice = ""
|
||||
@export var accept_option = ""
|
||||
@export var reject_option = ""
|
||||
|
||||
@onready var wait_a_sec: Timer = $WaitASec
|
||||
|
||||
signal accepted
|
||||
signal rejected
|
||||
|
||||
var is_accept_selected = true
|
||||
var is_choice_happening = false
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if not is_choice_happening:
|
||||
return
|
||||
|
||||
if Input.is_action_just_pressed("move_right"):
|
||||
is_accept_selected = false
|
||||
update_ui()
|
||||
|
||||
if Input.is_action_just_pressed("move_left"):
|
||||
is_accept_selected = true
|
||||
update_ui()
|
||||
|
||||
if Input.is_action_just_pressed("interact"):
|
||||
stop_choice()
|
||||
|
||||
|
||||
func update_ui():
|
||||
accept_indicator.visible = is_accept_selected
|
||||
reject_indicator.visible = not is_accept_selected
|
||||
|
||||
func toggle_ui():
|
||||
e_ui_button.visible = not e_ui_button.visible
|
||||
|
||||
func start_choice():
|
||||
bubbles.visible = true
|
||||
bubbles_back.visible = true
|
||||
bubbles_interior.visible = true
|
||||
bubble_label.visible = true
|
||||
e_ui_button.visible = true
|
||||
next_label.visible = true
|
||||
choices_container.visible = true
|
||||
|
||||
accept_label.text = accept_option
|
||||
reject_label.text = reject_option
|
||||
|
||||
is_accept_selected = true
|
||||
update_ui()
|
||||
|
||||
wait_a_sec.start()
|
||||
|
||||
func stop_choice():
|
||||
is_choice_happening = false
|
||||
|
||||
ui_flicker_timer.stop()
|
||||
|
||||
bubbles.visible = false
|
||||
bubbles_back.visible = false
|
||||
bubbles_interior.visible = false
|
||||
bubble_label.visible = false
|
||||
e_ui_button.visible = false
|
||||
next_label.visible = false
|
||||
choices_container.visible = false
|
||||
|
||||
if is_accept_selected:
|
||||
accepted.emit()
|
||||
else:
|
||||
rejected.emit()
|
||||
|
||||
func _on_wait_a_sec_timeout() -> void:
|
||||
is_choice_happening = true
|
||||
ui_flicker_timer.start()
|
1
dialogues/choice.gd.uid
Normal file
1
dialogues/choice.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b65dvbdgyplnm
|
17
dialogues/choice.tscn
Normal file
17
dialogues/choice.tscn
Normal file
@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://c2axd06m2g28y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b65dvbdgyplnm" path="res://dialogues/choice.gd" id="1_ht8c8"]
|
||||
|
||||
[node name="Choice" type="Node"]
|
||||
script = ExtResource("1_ht8c8")
|
||||
|
||||
[node name="UIFlickerTimer" type="Timer" parent="."]
|
||||
wait_time = 0.5
|
||||
ignore_time_scale = true
|
||||
|
||||
[node name="WaitASec" type="Timer" parent="."]
|
||||
wait_time = 0.5
|
||||
one_shot = true
|
||||
|
||||
[connection signal="timeout" from="UIFlickerTimer" to="." method="toggle_ui"]
|
||||
[connection signal="timeout" from="WaitASec" to="." method="_on_wait_a_sec_timeout"]
|
@ -13,7 +13,6 @@ extends Node
|
||||
@onready var e_ui_button: TextureRect = %E
|
||||
@onready var next_label: Label = %NextLabel
|
||||
|
||||
|
||||
@export_multiline var dialogue = ""
|
||||
@export var start_with_left = false
|
||||
@export var left_picture: Texture2D
|
||||
@ -31,7 +30,6 @@ func _ready() -> void:
|
||||
is_left_speaking = start_with_left
|
||||
left_speaker.texture = left_picture
|
||||
right_speaker.texture = right_picture
|
||||
display_profiles()
|
||||
|
||||
e_ui_button.visible = false
|
||||
next_label.visible = false
|
||||
@ -70,15 +68,18 @@ func load_next_dialogue():
|
||||
|
||||
func on_dialogue_started():
|
||||
bubbles.visible = true
|
||||
bubble_label.visible = true
|
||||
bubbles_back.visible = true
|
||||
bubbles_interior.visible = true
|
||||
|
||||
display_profiles()
|
||||
is_dialogue_ongoing = true
|
||||
time_between_letters.start()
|
||||
load_next_dialogue()
|
||||
|
||||
func end_dialogue():
|
||||
bubbles.visible = false
|
||||
bubble_label.visible = false
|
||||
bubbles_back.visible = false
|
||||
bubbles_interior.visible = false
|
||||
e_ui_button.visible = false
|
||||
@ -106,3 +107,7 @@ func _on_next_letter() -> void:
|
||||
|
||||
next_label.visible = true
|
||||
ui_flicker_timer.start()
|
||||
|
||||
|
||||
func _on_body_entered_trigger_dialogue(body: Node2D) -> void:
|
||||
on_dialogue_started()
|
||||
|
24
main.gd
24
main.gd
@ -8,6 +8,7 @@ var active_camera: SuperCamera
|
||||
@onready var opening_fade_to_black: ColorRect = $OpeningFadeToBlack
|
||||
|
||||
@onready var opening_cutscene: AnimationPlayer = $OpeningCutscene
|
||||
@onready var dance_cutscene: AnimationPlayer = $DanceCutscene
|
||||
|
||||
@onready var background_far: TileMapLayer = $BackgroundFar
|
||||
@onready var background_middle: TileMapLayer = $BackgroundMiddle
|
||||
@ -15,10 +16,12 @@ var active_camera: SuperCamera
|
||||
@onready var foreground_far: TileMapLayer = $ForegroundFar
|
||||
|
||||
@export_group("Parallax")
|
||||
@export var parallax_far = 0.1
|
||||
@export var parallax_middle = 0.3
|
||||
@export var parallax_close = 0.5
|
||||
@export var foreground = 0.8
|
||||
@export var parallax_far = 0.5
|
||||
@export var parallax_middle = 0.4
|
||||
@export var parallax_close = 0.3
|
||||
@export var foreground = 0.2
|
||||
|
||||
@onready var choices_container: MarginContainer = %ChoicesContainer
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
@ -39,9 +42,22 @@ func _process(delta: float) -> void:
|
||||
next_dialogue.global_position.x = active_camera.global_position.x + 133.0
|
||||
bubbles_back.global_position.x = active_camera.global_position.x
|
||||
bubbles_interior.global_position.x = active_camera.global_position.x
|
||||
choices_container.global_position.x = active_camera.global_position.x - 100
|
||||
|
||||
background_far.global_position.x = active_camera.global_position.x * parallax_far
|
||||
background_middle.global_position.x = active_camera.global_position.x * parallax_middle
|
||||
background_close.global_position.x = active_camera.global_position.x * parallax_close
|
||||
foreground_far.global_position.x = active_camera.global_position.x * foreground
|
||||
|
||||
|
||||
func _on_start_dancing() -> void:
|
||||
dance_cutscene.play("dance")
|
||||
|
||||
func restart_at_first_scene():
|
||||
pass
|
||||
|
||||
func to_main_menu():
|
||||
pass
|
||||
|
||||
func quit_game():
|
||||
pass
|
||||
|
BIN
player/assets/Bouclier.png
(Stored with Git LFS)
Normal file
BIN
player/assets/Bouclier.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Bouclier.png.import
Normal file
34
player/assets/Bouclier.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bfxgjrja1ah60"
|
||||
path="res://.godot/imported/Bouclier.png-e7c965646f348bf410efb0824b431e45.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Bouclier.png"
|
||||
dest_files=["res://.godot/imported/Bouclier.png-e7c965646f348bf410efb0824b431e45.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
|
BIN
player/assets/Danse.png
(Stored with Git LFS)
Normal file
BIN
player/assets/Danse.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Danse.png.import
Normal file
34
player/assets/Danse.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dv7jhtoptk12r"
|
||||
path="res://.godot/imported/Danse.png-360f9d75971dc28cdb901fbcce9ab403.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Danse.png"
|
||||
dest_files=["res://.godot/imported/Danse.png-360f9d75971dc28cdb901fbcce9ab403.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
|
BIN
player/assets/Défense.png
(Stored with Git LFS)
Normal file
BIN
player/assets/Défense.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Défense.png.import
Normal file
34
player/assets/Défense.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dcyawv770lkhp"
|
||||
path="res://.godot/imported/Défense.png-c9911fdbdfe0bbcdb6f1b11801052875.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Défense.png"
|
||||
dest_files=["res://.godot/imported/Défense.png-c9911fdbdfe0bbcdb6f1b11801052875.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
|
BIN
player/assets/Epee.png
(Stored with Git LFS)
Normal file
BIN
player/assets/Epee.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Epee.png.import
Normal file
34
player/assets/Epee.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://db3oaynrhd7wg"
|
||||
path="res://.godot/imported/Epee.png-2f948674a42be1d4f0f32c5289e9c5d8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Epee.png"
|
||||
dest_files=["res://.godot/imported/Epee.png-2f948674a42be1d4f0f32c5289e9c5d8.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
|
BIN
player/assets/Fleche.png
(Stored with Git LFS)
Normal file
BIN
player/assets/Fleche.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Fleche.png.import
Normal file
34
player/assets/Fleche.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://lhq6h8f81qrr"
|
||||
path="res://.godot/imported/Fleche.png-fd23037ecccb3463f4413f9430b058a1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Fleche.png"
|
||||
dest_files=["res://.godot/imported/Fleche.png-fd23037ecccb3463f4413f9430b058a1.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
|
BIN
player/assets/RunArmeEpee.png
(Stored with Git LFS)
Normal file
BIN
player/assets/RunArmeEpee.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/RunArmeEpee.png.import
Normal file
34
player/assets/RunArmeEpee.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dxsbbcagqkiid"
|
||||
path="res://.godot/imported/RunArmeEpee.png-53c014bb63270f9d7b7a1a264ad4311e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/RunArmeEpee.png"
|
||||
dest_files=["res://.godot/imported/RunArmeEpee.png-53c014bb63270f9d7b7a1a264ad4311e.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
|
BIN
player/assets/Stab .png
(Stored with Git LFS)
Normal file
BIN
player/assets/Stab .png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
player/assets/Stab .png.import
Normal file
34
player/assets/Stab .png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d2rfo6ilwusak"
|
||||
path="res://.godot/imported/Stab .png-066cf9b96545ad05213c48d15dd6666a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://player/assets/Stab .png"
|
||||
dest_files=["res://.godot/imported/Stab .png-066cf9b96545ad05213c48d15dd6666a.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
|
@ -11,17 +11,14 @@ var jump_velocity = 400.0
|
||||
@export_range(0, 10, 0.1, "or_greater")
|
||||
var gravity_modifier = 1
|
||||
|
||||
@onready var knight: AnimatedSprite2D = $Knight
|
||||
@onready var base: AnimatedSprite2D = $Base
|
||||
|
||||
var animated_sprites = []
|
||||
var current_sprite: AnimatedSprite2D
|
||||
|
||||
var is_in_cutscene = false # back to true on build
|
||||
var current_animation = "idle"
|
||||
|
||||
func play_anim():
|
||||
for sprite: AnimatedSprite2D in animated_sprites:
|
||||
sprite.play(current_animation)
|
||||
current_sprite.play(current_animation)
|
||||
|
||||
func play_anim_run():
|
||||
current_animation = "run"
|
||||
@ -31,30 +28,30 @@ func play_anim_idle():
|
||||
|
||||
func play_anim_jump():
|
||||
current_animation = "jump"
|
||||
|
||||
func play_anim_dance():
|
||||
current_animation = "dance"
|
||||
|
||||
func set_in_cutscene():
|
||||
is_in_cutscene = true
|
||||
play_anim_idle()
|
||||
|
||||
func set_in_play():
|
||||
is_in_cutscene = false
|
||||
|
||||
func look_left():
|
||||
for sprite in animated_sprites:
|
||||
sprite.flip_h = true
|
||||
current_sprite.flip_h = true
|
||||
|
||||
func look_right():
|
||||
for sprite in animated_sprites:
|
||||
sprite.flip_h = false
|
||||
current_sprite.flip_h = false
|
||||
|
||||
func _ready() -> void:
|
||||
animated_sprites = [
|
||||
knight,
|
||||
base
|
||||
]
|
||||
current_sprite = base
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
play_anim()
|
||||
if is_in_cutscene:
|
||||
velocity.x = move_toward(velocity.x, 0, speed)
|
||||
move_and_slide()
|
||||
return
|
||||
|
||||
@ -68,7 +65,6 @@ func _physics_process(delta: float) -> void:
|
||||
if direction < 0 and is_on_floor():
|
||||
look_left()
|
||||
|
||||
|
||||
if not is_on_floor():
|
||||
current_animation = "got_hit"
|
||||
else:
|
||||
@ -89,3 +85,14 @@ func _physics_process(delta: float) -> void:
|
||||
|
||||
func _on_dialogue_manager_dialogue_ended() -> void:
|
||||
set_in_play()
|
||||
|
||||
func _on_trigger_dialogue_body_entered(body: Node2D) -> void:
|
||||
set_in_cutscene()
|
||||
|
||||
func _on_start_dancing() -> void:
|
||||
play_anim_dance()
|
||||
|
||||
func _on_npc_shield_dialogue_dialogue_ended() -> void:
|
||||
set_in_play()
|
||||
print("jget shield")
|
||||
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=30 format=3 uid="uid://yvp44oauis4n"]
|
||||
[gd_scene load_steps=45 format=3 uid="uid://yvp44oauis4n"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c1fqj3lba7wik" path="res://player/player.gd" id="1_yw30f"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://i6035vm5ited" path="res://player/armored_spritesheet.tres" id="2_qjkh3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dv7jhtoptk12r" path="res://player/assets/Danse.png" id="3_hg6s5"]
|
||||
[ext_resource type="Texture2D" uid="uid://dwn548x0n4bpd" path="res://player/assets/Outch.png" id="3_rgyib"]
|
||||
[ext_resource type="Texture2D" uid="uid://dr5ypp4q8n2xm" path="res://player/assets/DebutIdle.png" id="4_rgyib"]
|
||||
[ext_resource type="Texture2D" uid="uid://dsxvqsh3umw01" path="res://player/assets/RunCycle.png" id="5_boad6"]
|
||||
@ -9,6 +10,62 @@
|
||||
[ext_resource type="Shape2D" uid="uid://6rhdwj5jxbxn" path="res://player/player_collision.tres" id="5_qjkh3"]
|
||||
[ext_resource type="Texture2D" uid="uid://dw6tn0grt2ajc" path="res://player/assets/WalkCycle.png" id="5_rgyib"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_tqiix"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_e7oew"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(32, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_c35mf"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(64, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_65viv"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(96, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_x7c3f"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(128, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_bjvpn"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(160, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s7qer"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(192, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ge24q"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(224, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_pnw6m"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(256, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_1so5t"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(288, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_55jnj"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(320, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dx5ib"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(352, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_a2xo5"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(384, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_art4l"]
|
||||
atlas = ExtResource("3_hg6s5")
|
||||
region = Rect2(416, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hg6s5"]
|
||||
atlas = ExtResource("3_rgyib")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
@ -93,6 +150,53 @@ region = Rect2(352, 0, 32, 32)
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_tqiix")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_e7oew")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_c35mf")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_65viv")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_x7c3f")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_bjvpn")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_s7qer")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_ge24q")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_pnw6m")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_1so5t")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_55jnj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_dx5ib")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_a2xo5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_art4l")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"dance",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": SubResource("AtlasTexture_hg6s5")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
@ -191,9 +295,9 @@ autoplay = "idle"
|
||||
[node name="Base" type="AnimatedSprite2D" parent="."]
|
||||
position = Vector2(0, -16)
|
||||
sprite_frames = SubResource("SpriteFrames_mmwog")
|
||||
animation = &"got_hit"
|
||||
animation = &"dance"
|
||||
autoplay = "idle"
|
||||
frame_progress = 0.993718
|
||||
frame_progress = 0.0683317
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
visible = false
|
||||
|
BIN
world_assets/Armoire.png
(Stored with Git LFS)
Normal file
BIN
world_assets/Armoire.png
(Stored with Git LFS)
Normal file
Binary file not shown.
34
world_assets/Armoire.png.import
Normal file
34
world_assets/Armoire.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://rbj0av8dvm2e"
|
||||
path="res://.godot/imported/Armoire.png-62a56be0dd5d8aab64da1c1f213a9e8a.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://world_assets/Armoire.png"
|
||||
dest_files=["res://.godot/imported/Armoire.png-62a56be0dd5d8aab64da1c1f213a9e8a.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
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user