vuxa bez duxa

This commit is contained in:
txrpe 2024-10-06 21:08:32 +02:00
parent d92c87bf80
commit feda1c5077
16 changed files with 284 additions and 30 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d4bxotobnphqi"
path="res://.godot/imported/IMG_3420.png-20cb88a95648d0cbb03ff8da8a7f2732.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Commrade/IMG_3420.png"
dest_files=["res://.godot/imported/IMG_3420.png-20cb88a95648d0cbb03ff8da8a7f2732.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ba3dsigd7bt8g"
path="res://.godot/imported/IMG_3421.png-0fc218959b1e11d7c5cd0698b6f6ce13.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Commrade/IMG_3421.png"
dest_files=["res://.godot/imported/IMG_3421.png-0fc218959b1e11d7c5cd0698b6f6ce13.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://26u2jyl2x1mo"
path="res://.godot/imported/IMG_3422.png-3e76f1493990113981f08c9a17171d55.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Commrade/IMG_3422.png"
dest_files=["res://.godot/imported/IMG_3422.png-3e76f1493990113981f08c9a17171d55.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8dnno2gbg2eb"
path="res://.godot/imported/IMG_3423.png-459d78f2534c359743b02f424d39e426.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Commrade/IMG_3423.png"
dest_files=["res://.godot/imported/IMG_3423.png-459d78f2534c359743b02f424d39e426.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0rh3bchcydxd"
path="res://.godot/imported/IMG_3424.png-c42724f31b9fbb6c2f07c82d1ba9a416.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://Assets/Commrade/IMG_3424.png"
dest_files=["res://.godot/imported/IMG_3424.png-c42724f31b9fbb6c2f07c82d1ba9a416.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

View File

@ -68,8 +68,8 @@ func spawn_enemy():
enemy.global_position = global_position
var rotated = randi_range(0, 1)
if(rotated == 1):
enemy.flip_animation()
enemy.global_rotation=rotated*PI
enemy.mirror()
#enemy.global_rotation=rotated*PI
enemy.enemy_attacked.connect(enemy_attacked)
func enemy_attacked():

View File

@ -5,21 +5,23 @@ signal enemy_attacked
func button_pressed():
$AnimatedSprite2D.play("defeated_3")
func _on_first_timer_timeout() -> void:
scale = Vector2(1.2,1.2)
func _process(delta: float) -> void:
$AnimatedSprite2D.modulate=color
func _on_second_timer_timeout() -> void:
scale = Vector2(1.4,1.4)
func _ready() -> void:
$AnimatedSprite2D.play("attack")
func flip_animation():
scale.y = -scale.y
func mirror():
scale.x = -scale.x
func _on_animated_sprite_2d_animation_finished() -> void:
if($AnimatedSprite2D.animation == "attack"):
enemy_attacked.emit()
$AnimatedSprite2D.play("attack_2")
return
print_debug($AnimatedSprite2D.animation)
match $AnimatedSprite2D.animation:
"defeated_3", "defeated_2", "defeated_4", "attack_2":
queue_free()
return

View File

@ -39,23 +39,28 @@ animations = [{
}, {
"duration": 4.0,
"texture": ExtResource("6_v8bp8")
}, {
"duration": 1.0,
"texture": ExtResource("7_7om5h")
}, {
"duration": 1.0,
"texture": ExtResource("8_ehav7")
}, {
"duration": 1.0,
"texture": ExtResource("7_7om5h")
}, {
"duration": 1.0,
"texture": ExtResource("8_ehav7")
}],
"loop": false,
"name": &"attack",
"speed": 9.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("8_ehav7")
}, {
"duration": 1.0,
"texture": ExtResource("7_7om5h")
}, {
"duration": 1.0,
"texture": ExtResource("8_ehav7")
}, {
"duration": 1.0,
"texture": ExtResource("7_7om5h")
}],
"loop": false,
"name": &"attack_2",
"speed": 5.0
}, {
"frames": [],
"loop": true,
"name": &"default",
@ -70,7 +75,7 @@ animations = [{
}],
"loop": false,
"name": &"defeated_2",
"speed": 8.0
"speed": 10.0
}, {
"frames": [{
"duration": 1.0,
@ -101,7 +106,7 @@ animations = [{
}],
"loop": false,
"name": &"defeated_4",
"speed": 8.0
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
@ -146,7 +151,7 @@ autostart = true
position = Vector2(-66, -21)
scale = Vector2(0.282227, 0.282227)
sprite_frames = SubResource("SpriteFrames_5w8q8")
animation = &"defeated_4"
animation = &"defeated_2"
[connection signal="timeout" from="FirstTimer" to="." method="_on_first_timer_timeout"]
[connection signal="timeout" from="SecondTimer" to="." method="_on_second_timer_timeout"]

36
commander.tscn Normal file
View File

@ -0,0 +1,36 @@
[gd_scene load_steps=7 format=3 uid="uid://u7xv8jgsa78g"]
[ext_resource type="Texture2D" uid="uid://d4bxotobnphqi" path="res://Assets/Commrade/IMG_3420.png" id="1_afvgu"]
[ext_resource type="Texture2D" uid="uid://ba3dsigd7bt8g" path="res://Assets/Commrade/IMG_3421.png" id="2_adj7w"]
[ext_resource type="Texture2D" uid="uid://26u2jyl2x1mo" path="res://Assets/Commrade/IMG_3422.png" id="3_672my"]
[ext_resource type="Texture2D" uid="uid://c8dnno2gbg2eb" path="res://Assets/Commrade/IMG_3423.png" id="4_j3c1o"]
[ext_resource type="Texture2D" uid="uid://d0rh3bchcydxd" path="res://Assets/Commrade/IMG_3424.png" id="5_qsmgr"]
[sub_resource type="SpriteFrames" id="SpriteFrames_dpyc6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_afvgu")
}, {
"duration": 1.0,
"texture": ExtResource("2_adj7w")
}, {
"duration": 1.0,
"texture": ExtResource("3_672my")
}, {
"duration": 1.0,
"texture": ExtResource("4_j3c1o")
}, {
"duration": 1.0,
"texture": ExtResource("5_qsmgr")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="Commander" type="Node2D"]
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.284974, 0.284974)
sprite_frames = SubResource("SpriteFrames_dpyc6")

17
game.gdshader Normal file
View File

@ -0,0 +1,17 @@
//Shader by: Jordancjb (https://linktr.ee/jordancjb)
//Licensed under Creative Commons 0, Use as you like c:
shader_type canvas_item;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
//Noise Texture
uniform sampler2D Noise;
//Settings
uniform float Transparency = 4.0;
uniform float Slow = 25.0;
//Shader Code
void fragment() {
COLOR = texture(SCREEN_TEXTURE, SCREEN_UV) * texture(Noise, texture(Noise, UV).xy + cos(TIME) / Slow) / Transparency;
}

View File

@ -1,17 +1,33 @@
[gd_scene load_steps=6 format=3 uid="uid://decsef3jj3lt5"]
[gd_scene load_steps=10 format=3 uid="uid://decsef3jj3lt5"]
[ext_resource type="Script" path="res://game.gd" id="1_bhcvq"]
[ext_resource type="PackedScene" uid="uid://bhvihrt8dipll" path="res://Scenes/Button/button.tscn" id="1_j4pve"]
[ext_resource type="Shader" path="res://game.gdshader" id="2_k6uao"]
[ext_resource type="PackedScene" uid="uid://du2jgrreaylhr" path="res://Scenes/dialog.tscn" id="3_s0nfr"]
[ext_resource type="Script" path="res://camera_2d.gd" id="4_u8t00"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_sesmb"]
size = Vector2(995, 433.534)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_rpvun"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_0s1i7"]
seamless = true
seamless_blend_skirt = 0.279
noise = SubResource("FastNoiseLite_rpvun")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ob5l5"]
shader = ExtResource("2_k6uao")
shader_parameter/Transparency = 3.0
shader_parameter/Slow = 25.0
shader_parameter/Noise = SubResource("NoiseTexture2D_0s1i7")
[node name="Game" type="Node2D"]
process_mode = 3
script = ExtResource("1_bhcvq")
[node name="Dialog" parent="." instance=ExtResource("3_s0nfr")]
[node name="CanvasLayer" type="CanvasLayer" parent="."]
layer = -1
follow_viewport_enabled = true
@ -42,6 +58,8 @@ theme_override_font_sizes/font_size = 40
text = "0"
horizontal_alignment = 1
[node name="Dialog2" parent="CanvasLayer" instance=ExtResource("3_s0nfr")]
[node name="A" parent="." groups=["button_group"] instance=ExtResource("1_j4pve")]
position = Vector2(872, 515)
input_name = "A"
@ -83,6 +101,7 @@ input_name = "B"
color_mix = Color(0.74, 0, 0.0123331, 1)
[node name="SpawnArea" type="Area2D" parent="."]
visible = false
scale = Vector2(1, 1.02189)
metadata/_edit_group_ = true
@ -94,12 +113,17 @@ debug_color = Color(0, 0.6, 0.701961, 0.14902)
[node name="SpawnTimer" type="Timer" parent="."]
wait_time = 0.5
[node name="Dialog" parent="." instance=ExtResource("3_s0nfr")]
[node name="Camera2D" type="Camera2D" parent="."]
position = Vector2(574, 326)
script = ExtResource("4_u8t00")
randomStrength = 10.0
[connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"]
[node name="shader" type="ColorRect" parent="."]
visible = false
top_level = true
material = SubResource("ShaderMaterial_ob5l5")
offset_right = 1177.0
offset_bottom = 668.0
[connection signal="dialogue_over" from="Dialog" to="." method="_on_dialog_dialogue_over"]
[connection signal="timeout" from="SpawnTimer" to="." method="_on_spawn_timer_timeout"]