Falling rose petal effect
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cjl20bs56430j"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://b1ucutlpx3fnp" path="res://Textures/GUI/INTRO LORE.png" id="1_f4dp3"]
|
||||
[ext_resource type="Texture2D" uid="uid://haxbuoepqn2b" path="res://Textures/GUI/LEVEL DROP 1.png" id="2_r3e0d"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1ucutlpx3fnp" path="res://UI/INTRO LORE.png" id="1_f4dp3"]
|
||||
[ext_resource type="Texture2D" uid="uid://haxbuoepqn2b" path="res://UI/LEVEL DROP 1.png" id="2_r3e0d"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_3u8q8"]
|
||||
resource_name = "FirstLevel"
|
||||
@@ -198,7 +198,6 @@ mouse_filter = 2
|
||||
color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
speed_scale = 64.0
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_iabf8")
|
||||
}
|
||||
|
||||
@@ -1178,22 +1178,15 @@ size = Vector3(0.641537, 0.560677, 0.708051)
|
||||
size = Vector3(0.572433, 1.81406, 0.604365)
|
||||
|
||||
[node name="Melee Enemy" type="RigidBody3D" node_paths=PackedStringArray("_hp") groups=["Enemy"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0175109, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, -0.0175109, 0)
|
||||
disable_mode = 2
|
||||
collision_layer = 0
|
||||
collision_mask = 33
|
||||
axis_lock_linear_x = true
|
||||
axis_lock_linear_y = true
|
||||
axis_lock_linear_z = true
|
||||
axis_lock_angular_x = true
|
||||
axis_lock_angular_y = true
|
||||
axis_lock_angular_z = true
|
||||
gravity_scale = 0.0
|
||||
continuous_cd = true
|
||||
max_contacts_reported = 20
|
||||
contact_monitor = true
|
||||
can_sleep = false
|
||||
lock_rotation = true
|
||||
script = ExtResource("1_50och")
|
||||
_hp = NodePath("HP Component")
|
||||
|
||||
@@ -1201,31 +1194,31 @@ _hp = NodePath("HP Component")
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0984273, 0.568423, -0.107118)
|
||||
|
||||
[node name="Icosphere001" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(0.85892, 0, 0, 0, 0.85892, 0, 0, 0, 0.85892, 0.0805536, 0.469751, 0.158035)
|
||||
transform = Transform3D(0.846559, 0, 0, 0, 0.846559, 0, 0, 0, 0.846559, 0.0805536, 0.450075, 0.158035)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_vf33t")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="Circle001" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(1.00867, 0, -0.291695, 0, 1.05, 0, 0.291695, 0, 1.00867, 0.0457887, 0.476383, 0.128917)
|
||||
transform = Transform3D(0.681135, 0, -0.799096, 0, 1.05, 0, 0.799096, 0, 0.681135, 0.0457887, 0.476383, 0.128917)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_ngagc")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="Circle002" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(1.1, 0, 0, 0, 1.0567, 0.305586, 0, -0.305586, 1.0567, 0.0659095, 0.483551, 0.119628)
|
||||
transform = Transform3D(1.1, 0, 0, 0, 0.713571, 0.837148, 0, -0.837148, 0.713571, 0.0659095, 0.483551, 0.119628)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_nmeup")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="Circle004" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(0.960638, -0.277805, 0, 0.277805, 0.960638, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
|
||||
transform = Transform3D(0.6487, -0.761044, 0, 0.761044, 0.6487, 0, 0, 0, 1, 0.0868937, 0.567455, 0.186096)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_nso1s")
|
||||
skeleton = NodePath("")
|
||||
|
||||
[node name="Text003" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(0.0451983, 0, -0.0289879, 0, 0.0536953, 0, 0.0289879, 0, 0.0451983, 0.0626427, 0.123465, 0.11049)
|
||||
transform = Transform3D(-0.00961914, 0, -0.0528267, 0, 0.0536953, 0, 0.0528267, 0, -0.00961914, 0.0626427, 0.123465, 0.11049)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_xasdc")
|
||||
skeleton = NodePath("")
|
||||
@@ -1234,7 +1227,7 @@ skeleton = NodePath("")
|
||||
transform = Transform3D(0.495255, 0, 0, 0, 0.495255, 0, 0, 0, 0.495255, 0.0690689, -0.0909151, 0.128142)
|
||||
|
||||
[node name="Text004" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(0.0461675, 0, -0.0133511, 0, 0.0480592, 0, 0.0133511, 0, 0.0461675, 0.0626427, 0.123465, 0.11049)
|
||||
transform = Transform3D(0.031176, 0, -0.0365752, 0, 0.0480592, 0, 0.0365752, 0, 0.031176, 0.0626427, 0.123465, 0.11049)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_8gdy4")
|
||||
skeleton = NodePath("")
|
||||
@@ -1243,7 +1236,7 @@ skeleton = NodePath("")
|
||||
transform = Transform3D(0.443271, 0, 0, 0, 0.443271, 0, 0, 0, 0.443271, 0.0690689, -0.0909151, 0.128142)
|
||||
|
||||
[node name="Text005" type="MeshInstance3D" parent="MeleeEnemy"]
|
||||
transform = Transform3D(0.0291171, 0, -0.0327813, 0, 0.0438454, 0, 0.0327813, 0, 0.0291171, 0.0626427, 0.123465, 0.11049)
|
||||
transform = Transform3D(-0.0386024, 0, -0.0207913, 0, 0.0438454, 0, 0.0207913, 0, -0.0386024, 0.0626427, 0.123465, 0.11049)
|
||||
cast_shadow = 0
|
||||
mesh = SubResource("ArrayMesh_bkeh8")
|
||||
skeleton = NodePath("")
|
||||
@@ -1272,5 +1265,5 @@ collision_mask = 68
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||||
shape = SubResource("BoxShape3D_lqe1n")
|
||||
|
||||
[connection signal="body_entered" from="Area3D" to="." method="OnPlayerHit"]
|
||||
[connection signal="body_entered" from="Area3D" to="." method="OnEnemyHit"]
|
||||
[connection signal="body_entered" from="Area3D" to="." method="OnPlayerHit"]
|
||||
|
||||
@@ -892,7 +892,7 @@ blend_shape_mode = 0
|
||||
shadow_mesh = SubResource("ArrayMesh_j7wsk")
|
||||
|
||||
[node name="RangedEnemy" type="RigidBody3D" node_paths=PackedStringArray("_hp") groups=["Enemy"]]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.257979, 0)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.257979, 0)
|
||||
collision_layer = 0
|
||||
collision_mask = 68
|
||||
gravity_scale = 0.0
|
||||
|
||||
@@ -82,7 +82,7 @@ public partial class GameManager : Node
|
||||
|
||||
player.CharactersLeftOnStage.RemoveAt(player.CharacterIndex);
|
||||
if (player.SelectedCharacter is not null)
|
||||
GetTree().Root.RemoveChild(player.SelectedCharacter);
|
||||
GetTree().Root.RemoveChild(player.SelectedCharacter);
|
||||
|
||||
player.CharacterIndex = 0;
|
||||
if (player.CharactersLeftOnStage.Any())
|
||||
@@ -140,7 +140,7 @@ public partial class GameManager : Node
|
||||
player.CharacterIndex = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
foreach (var character in playerCharacters)
|
||||
character.GetParent().RemoveChild(character);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=17 format=3 uid="uid://vwrw05ob2caq"]
|
||||
[gd_scene load_steps=20 format=3 uid="uid://vwrw05ob2caq"]
|
||||
|
||||
[ext_resource type="Script" path="res://GameLogic/Main.cs" id="1_g4hua"]
|
||||
[ext_resource type="PackedScene" uid="uid://btl5fdyjewnwc" path="res://Levels/Scenes/Level3.tscn" id="2_0yhby"]
|
||||
@@ -21,14 +21,26 @@
|
||||
font = SubResource("SystemFont_o1buo")
|
||||
font_color = Color(0, 1, 0, 1)
|
||||
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_6bq1c"]
|
||||
sky_top_color = Color(1, 1, 1, 1)
|
||||
sky_horizon_color = Color(1, 1, 1, 1)
|
||||
sky_energy_multiplier = 1.1
|
||||
ground_bottom_color = Color(1, 1, 1, 1)
|
||||
ground_horizon_color = Color(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_wvyol"]
|
||||
sky_material = SubResource("ProceduralSkyMaterial_6bq1c")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_m6quh"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_wvyol")
|
||||
|
||||
[node name="Main" type="Node3D" node_paths=PackedStringArray("_fpsCounter")]
|
||||
script = ExtResource("1_g4hua")
|
||||
Levels = Array[PackedScene]([ExtResource("2_0yhby"), ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("5_xj47l"), ExtResource("7_58n7x"), ExtResource("8_pcp3p"), ExtResource("6_xmedq"), ExtResource("9_n1hja"), ExtResource("10_rs7ve"), ExtResource("11_o275c")])
|
||||
Levels = Array[PackedScene]([ExtResource("8_pcp3p"), ExtResource("2_jq3qe"), ExtResource("3_nhrqr"), ExtResource("2_0yhby"), ExtResource("5_xj47l"), ExtResource("7_58n7x"), ExtResource("6_xmedq"), ExtResource("9_n1hja"), ExtResource("10_rs7ve"), ExtResource("11_o275c")])
|
||||
GameManager = ExtResource("11_wiyvp")
|
||||
_fpsCounter = NodePath("FPS Counter")
|
||||
|
||||
[node name="SceneTransition" parent="." instance=ExtResource("14_ai16y")]
|
||||
|
||||
[node name="SFXPlayer" type="AudioStreamPlayer" parent="."]
|
||||
max_polyphony = 10
|
||||
|
||||
@@ -54,3 +66,10 @@ transform = Transform3D(1, 0, 0, 0, 0.5, 0.866025, 0, -0.866025, 0.5, -0.527878,
|
||||
projection = 1
|
||||
current = true
|
||||
size = 10.8546
|
||||
|
||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||
environment = SubResource("Environment_m6quh")
|
||||
|
||||
[node name="SceneTransition" parent="." instance=ExtResource("14_ai16y")]
|
||||
top_level = true
|
||||
z_index = 500
|
||||
|
||||
79
Levels/Scenes/FallingLeaves.gdshader
Normal file
79
Levels/Scenes/FallingLeaves.gdshader
Normal file
@@ -0,0 +1,79 @@
|
||||
// Waving Particles shader by Brian Smith (steampunkdemon.itch.io)
|
||||
// MIT licence
|
||||
|
||||
shader_type canvas_item;
|
||||
|
||||
// Uncomment the following line if you are using a version of Godot before 4.0:
|
||||
// const float PI = 3.14159;
|
||||
|
||||
// Comment out the following line if you are not applying the shader to a ColorRect:
|
||||
uniform vec2 dimensions = vec2(1152.0, 648.0); // Resolution of ColorRect in pixels
|
||||
|
||||
uniform float rows = 20.0;
|
||||
uniform float columns = 5.0;
|
||||
uniform float vertical_scroll : hint_range(-1.0, 1.0, 0.01) = 0.5;
|
||||
uniform float horizontal_scroll : hint_range(-1.0, 1.0, 0.01) = 0.1;
|
||||
uniform float size_min : hint_range(0.1, 1.0, 0.1) = 0.3;
|
||||
uniform float size_max : hint_range(0.1, 1.0, 0.1) = 0.7; // If 'size_max' is larger than 0.7 the corners of the particles will be clipped if they are rotating.
|
||||
uniform float wave_min : hint_range(0.0, 1.0, 0.1) = 0.1;
|
||||
uniform float wave_max : hint_range(0.0, 1.0, 0.1) = 1.0; // If the particles are waving into the neighbouring columns reduce 'wave_max'.
|
||||
uniform float wave_speed : hint_range(0.0, 2.0, 0.1) = 0.5;
|
||||
uniform float wave_rotation : hint_range(-1.0, 1.0, 0.1) = 1.0;
|
||||
uniform float fallSpeed = 0.5;
|
||||
|
||||
// Replace the below references to 'source_color' with 'hint_color' if you are using a version of Godot before 4.0:
|
||||
uniform vec4 far_color : source_color = vec4(0.5, 0.5, 0.5, 1.0);
|
||||
uniform vec4 near_color : source_color = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
|
||||
// Remove the below reference to ': source_color, filter_nearest_mipmap' if you are using a version of Godot before 4.0:
|
||||
uniform sampler2D particle_texture : source_color, filter_nearest_mipmap;
|
||||
|
||||
float greater_than(float x, float y) {
|
||||
return max(sign(x - y), 0.0);
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// You can comment out the below line and add a new uniform above as:
|
||||
// uniform float time = 10000.0;
|
||||
// You can then update the time uniform from your _physics_process function by adding or subtracting delta. You can also pause the particles' motion by not changing the time uniform.
|
||||
float time = 10000.0 + TIME;
|
||||
|
||||
// Comment out the following two lines if you are not applying the shader to a TextureRect:
|
||||
// COLOR = texture(TEXTURE,UV); // This line is only required if you are using a version of Godot before 4.0.
|
||||
// vec2 dimensions = 1.0 / TEXTURE_PIXEL_SIZE;
|
||||
|
||||
float row_rn = fract(sin(floor((UV.y - vertical_scroll * time * fallSpeed) * rows)));
|
||||
float column_rn = fract(sin(floor((UV.x + row_rn - horizontal_scroll * time * fallSpeed) * columns)));
|
||||
float wave = sin(wave_speed * time * fallSpeed + column_rn * 90.0);
|
||||
vec2 uv = (vec2(fract((UV.x + row_rn - horizontal_scroll * time * fallSpeed + (wave * (wave_min + (wave_max - wave_min) * column_rn) / columns / 2.0)) * columns), fract((UV.y - vertical_scroll * time * fallSpeed) * rows)) * 2.0 - 1.0) * vec2(dimensions.x / dimensions.y * rows / columns, 1.0);
|
||||
float size = size_min + (size_max - size_min) * column_rn;
|
||||
vec4 color = mix(far_color, near_color, column_rn);
|
||||
|
||||
// Comment out the below two lines if you do not need or want the particles to rotate:
|
||||
// float a = ((column_rn + wave) * wave_rotation) * PI;
|
||||
// uv *= mat2(vec2(sin(a), -cos(a)), vec2(cos(a), sin(a)));
|
||||
|
||||
// Render particles as circles with soft edges:
|
||||
COLOR.rgb = mix(COLOR.rgb, color.rgb, max((size - length(uv)) / size, 0.0) * color.a);
|
||||
|
||||
// Render particles as circles with hard edges:
|
||||
// COLOR.rgb = mix(COLOR.rgb, color.rgb, greater_than(size, length(uv)) * color.a);
|
||||
|
||||
// Render particles as crosses with soft edges:
|
||||
// COLOR.rgb = mix(COLOR.rgb, color.rgb, max((size - length(uv)) / size, 0.0) * (max(greater_than(size / 10.0, abs(uv.x)), greater_than(size / 10.0, abs(uv.y)))) * color.a);
|
||||
|
||||
// Render particles as crosses with hard edges:
|
||||
// COLOR.rgb = mix(COLOR.rgb, color.rgb, max(greater_than(size / 5.0, abs(uv.x)) * greater_than(size, abs(uv.y)), greater_than(size / 5.0, abs(uv.y)) * greater_than(size, abs(uv.x))) * color.a);
|
||||
|
||||
// Render particles as squares:
|
||||
// COLOR.rgb = mix(COLOR.rgb, color.rgb, greater_than(size, abs(uv.x)) * greater_than(size, abs(uv.y)) * color.a);
|
||||
|
||||
// Render particles as diamonds:
|
||||
// COLOR.rgb = mix(COLOR.rgb, color.rgb, greater_than(size, abs(uv.y) + abs(uv.x)) * color.a);
|
||||
|
||||
// Render particles using the 'particle_texture':
|
||||
// The texture should have a border of blank transparent pixels.
|
||||
vec4 particle_texture_pixel = texture(particle_texture, (uv / size + 1.0) / 2.0) * color;
|
||||
COLOR.rgb = mix(COLOR.rgb, particle_texture_pixel.rgb, particle_texture_pixel.a);
|
||||
COLOR.a = min(COLOR.a, particle_texture_pixel.a);
|
||||
}
|
||||
@@ -479,7 +479,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.34053, 0, -3.4541)
|
||||
shape = SubResource("BoxShape3D_o7d2x")
|
||||
|
||||
[node name="Door" type="MeshInstance3D" parent="." node_paths=PackedStringArray("AnimationPlayer")]
|
||||
transform = Transform3D(1.374, -1.42347e-07, -2.08591e-08, 1.4314e-07, -0.825919, 0.0510564, 3.9862e-07, 0.787235, 0.0535653, -0.666889, 0.665627, 0.217102)
|
||||
transform = Transform3D(1.374, -1.42347e-07, -2.08591e-08, 1.4314e-07, -0.825919, 0.0510564, 3.9862e-07, 0.787235, 0.0535653, -0.666889, 0.665627, 0.069543)
|
||||
mesh = SubResource("ArrayMesh_5vvrp")
|
||||
skeleton = NodePath("")
|
||||
script = ExtResource("8_ow05j")
|
||||
@@ -504,7 +504,7 @@ transform = Transform3D(1, -2.84217e-14, -1.27055e-21, 2.84217e-14, 1, 2.98023e-
|
||||
collision_mask = 32
|
||||
|
||||
[node name="CollisionShape3D5" type="CollisionShape3D" parent="Door/StaticBody3D/Door Hitbox"]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -0.571146, 0.810928, 0.294388)
|
||||
transform = Transform3D(-4.37114e-08, 2.5411e-21, 1, 1.42109e-14, 1, -2.5411e-21, -1, -2.84217e-14, -4.37114e-08, -0.571146, 0.810928, 0.294388)
|
||||
shape = SubResource("BoxShape3D_yew2s")
|
||||
|
||||
[node name="Exit Portal" parent="." instance=ExtResource("3_2t766")]
|
||||
|
||||
@@ -1,10 +1,30 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://bsq7edeueqyjg"]
|
||||
[gd_scene load_steps=16 format=3 uid="uid://bsq7edeueqyjg"]
|
||||
|
||||
[ext_resource type="Script" path="res://Levels/Scripts/Level.cs" id="1_wqwee"]
|
||||
[ext_resource type="PackedScene" uid="uid://bgf5byqt71kir" path="res://Levels/Models/Stage7/Stage7.tscn" id="2_21i6n"]
|
||||
[ext_resource type="PackedScene" uid="uid://dahp73fwld24h" path="res://Enemies/RangedEnemy.tscn" id="3_k38yu"]
|
||||
[ext_resource type="PackedScene" uid="uid://jgf7k1r35km1" path="res://Levels/ExitPortal.tscn" id="3_sjnhq"]
|
||||
[ext_resource type="PackedScene" uid="uid://bt5rolsyjmx55" path="res://Enemies/MeleeEnemy.tscn" id="4_i8hlv"]
|
||||
[ext_resource type="Shader" path="res://Levels/Scenes/FallingLeaves.gdshader" id="6_biibx"]
|
||||
[ext_resource type="Texture2D" uid="uid://jb30lo7r5ev4" path="res://Textures/rose petal 1.png" id="7_it0x1"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_qgv5j"]
|
||||
shader = ExtResource("6_biibx")
|
||||
shader_parameter/dimensions = Vector2(1152, 648)
|
||||
shader_parameter/rows = 75.0
|
||||
shader_parameter/columns = 3.0
|
||||
shader_parameter/vertical_scroll = 0.5
|
||||
shader_parameter/horizontal_scroll = 0.34
|
||||
shader_parameter/size_min = 1.0
|
||||
shader_parameter/size_max = 1.0
|
||||
shader_parameter/wave_min = 0.5
|
||||
shader_parameter/wave_max = 1.0
|
||||
shader_parameter/wave_speed = 1.3
|
||||
shader_parameter/wave_rotation = 1.0
|
||||
shader_parameter/fallSpeed = 0.1
|
||||
shader_parameter/far_color = Color(0.5, 0.5, 0.5, 1)
|
||||
shader_parameter/near_color = Color(1, 1, 1, 1)
|
||||
shader_parameter/particle_texture = ExtResource("7_it0x1")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ny8q1"]
|
||||
size = Vector3(5, 20, 27.822)
|
||||
@@ -31,6 +51,25 @@ size = Vector3(4.32001, 3, 4.24331)
|
||||
process_mode = 3
|
||||
script = ExtResource("1_wqwee")
|
||||
|
||||
[node name="Container" type="Control" parent="."]
|
||||
use_parent_material = true
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="Container"]
|
||||
z_index = -1
|
||||
material = SubResource("ShaderMaterial_qgv5j")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="STAGE 7" parent="." instance=ExtResource("2_21i6n")]
|
||||
transform = Transform3D(1.04, 0, 0, 0, 1.04, 0, 0, 0, 1.04, -0.601425, 0, 0)
|
||||
|
||||
@@ -80,10 +119,10 @@ shape = SubResource("BoxShape3D_tj084")
|
||||
[node name="Enemies" type="Node3D" parent="."]
|
||||
|
||||
[node name="RangedEnemy" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.85384, 0, 2.31457)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -4.85384, 0, 2.31457)
|
||||
|
||||
[node name="RangedEnemy2" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.38654, 0, 2.40798)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 3.38654, 0, 2.40798)
|
||||
|
||||
[node name="Melee Enemy" parent="Enemies" instance=ExtResource("4_i8hlv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.55692, 0, 1.39133)
|
||||
@@ -95,22 +134,22 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.06656, 0, 1.27775)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.737402, 0, -0.439096)
|
||||
|
||||
[node name="RangedEnemy3" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.37518, 0.999847, -5.54545)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 2.87835, 0.552559, -4.46606)
|
||||
|
||||
[node name="RangedEnemy4" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.6339, 0.999847, -5.22149)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 1.43271, 0.54106, -4.59394)
|
||||
|
||||
[node name="RangedEnemy5" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.62257, 0.999847, -5.26199)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -3.62257, 0.525391, -4.57564)
|
||||
|
||||
[node name="RangedEnemy6" parent="Enemies" instance=ExtResource("3_k38yu")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5.3436, 0.999847, -5.72768)
|
||||
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, -5.3436, 0.564535, -4.33553)
|
||||
|
||||
[node name="Melee Enemy4" parent="Enemies" instance=ExtResource("4_i8hlv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.7193, 0, -6.94253)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.7193, 0, -6.27177)
|
||||
|
||||
[node name="Melee Enemy5" parent="Enemies" instance=ExtResource("4_i8hlv")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.366184, 0, -6.90203)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.366184, 0, -6.28619)
|
||||
|
||||
[node name="Exit Portal" parent="." instance=ExtResource("3_sjnhq")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.484857, 0.170241, -5.15013)
|
||||
|
||||
@@ -15,12 +15,17 @@ public partial class Character : CharacterBody3D
|
||||
|
||||
public bool CanShoot { get; protected set; }
|
||||
|
||||
public bool CanShootAlt { get; protected set; }
|
||||
|
||||
protected GameManager _gameManager;
|
||||
|
||||
private bool isPaused;
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
Position = OwnerPlayer.SpawnPoint.Position;
|
||||
CanShoot = true;
|
||||
CanShootAlt = true;
|
||||
_gameManager = GetTree().Root.GetNode<GameManager>("Main/GameManager");
|
||||
}
|
||||
|
||||
@@ -35,14 +40,14 @@ public partial class Character : CharacterBody3D
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
|
||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.Fire()) && CanShoot)
|
||||
Fire();
|
||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.AltFire()) && CanShoot)
|
||||
if (Input.IsActionJustPressed(OwnerPlayer.PlayerInput.AltFire()) && CanShootAlt)
|
||||
AltFire();
|
||||
}
|
||||
|
||||
@@ -94,9 +99,9 @@ public partial class Character : CharacterBody3D
|
||||
if (proj.HasRotation)
|
||||
proj.Rotation = GetNode<Node3D>("Pivot").Rotation;
|
||||
}
|
||||
CanShoot = false;
|
||||
CanShootAlt = false;
|
||||
await ToSignal(GetTree().CreateTimer(projectiles.First().Cooldown), "timeout");
|
||||
CanShoot = true;
|
||||
CanShootAlt = true;
|
||||
}
|
||||
|
||||
public void OnHit(Node3D node)
|
||||
|
||||
@@ -20,7 +20,7 @@ public partial class CapricornControls : Character
|
||||
MoveAndSlide();
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed("exit"))
|
||||
GetTree().Quit();
|
||||
@@ -86,8 +86,8 @@ public partial class CapricornControls : Character
|
||||
{
|
||||
IsShooting = true;
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||
var projectile = _fireProjectile.Instantiate<Node3D>();
|
||||
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||
projectile.Position = Position;
|
||||
if (GetParent() != null)
|
||||
GetParent().AddChild(projectile);
|
||||
@@ -99,8 +99,8 @@ public partial class CapricornControls : Character
|
||||
{
|
||||
IsShooting = true;
|
||||
CanShoot = false;
|
||||
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||
var projectile = _altFireProjectile.Instantiate<Node3D>();
|
||||
await ToSignal(GetTree().CreateTimer(1.0f), "timeout");
|
||||
projectile.Position = Position;
|
||||
if (GetParent() != null)
|
||||
GetParent().AddChild(projectile);
|
||||
|
||||
BIN
Textures/rose petal 1.png
Normal file
BIN
Textures/rose petal 1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 505 B |
34
Textures/rose petal 1.png.import
Normal file
34
Textures/rose petal 1.png.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://jb30lo7r5ev4"
|
||||
path="res://.godot/imported/rose petal 1.png-56472e417d88a0de06418448cf5e4e3b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Textures/rose petal 1.png"
|
||||
dest_files=["res://.godot/imported/rose petal 1.png-56472e417d88a0de06418448cf5e4e3b.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
|
||||
@@ -14,23 +14,28 @@ public partial class MainMenu : Node2D
|
||||
{
|
||||
GetParent().GetNode<TextureRect>("MainMenu/UIAnimations/LoreSplash").Show();
|
||||
_animationPlayer = GetTree().Root.GetNode<AnimationPlayer>("/root/Main/MainMenu/UIAnimations/AnimationPlayer");
|
||||
_animationPlayer.Queue("IntroLore");
|
||||
_animationPlayer.Play("IntroLore");
|
||||
var bgmPlayer = GetTree().Root.GetNode<BGMPlayer>("BgmPlayer");
|
||||
bgmPlayer.SetBGMFromFilepath("Audio/BGM/TitleTheme.ogg");
|
||||
bgmPlayer.PlayBGM();
|
||||
_player1Input = new Player1Input();
|
||||
_player2Input = new Player2Input();
|
||||
GetNode<TextureButton>("NewGame/1Player").GrabFocus();
|
||||
_animationPlayer.AnimationFinished += OnIntroAnimationFinished;
|
||||
}
|
||||
|
||||
public override void _UnhandledInput(InputEvent @event)
|
||||
{
|
||||
if (Input.IsActionJustPressed(_player1Input.Fire()) || Input.IsActionJustPressed(_player2Input.Fire()))
|
||||
if (_animationPlayer.IsPlaying() && (Input.IsActionJustPressed(_player1Input.Fire()) || Input.IsActionJustPressed(_player2Input.Fire())))
|
||||
{
|
||||
_animationPlayer.Seek(10);
|
||||
GetNode<TextureButton>("NewGame/1Player").GrabFocus();
|
||||
}
|
||||
}
|
||||
|
||||
public void OnIntroAnimationFinished(StringName animationName)
|
||||
{
|
||||
GetNode<TextureButton>("NewGame/1Player").GrabFocus();
|
||||
}
|
||||
|
||||
|
||||
private void OneSinglePlayerPressed()
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
script = ExtResource("1_6aikc")
|
||||
|
||||
[node name="UIAnimations" parent="." instance=ExtResource("2_erh7e")]
|
||||
visible = false
|
||||
|
||||
[node name="NewGame" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
|
||||
@@ -35,7 +35,7 @@ public partial class StageGUI : Control
|
||||
ChangeBG(player);
|
||||
}
|
||||
|
||||
public override void _Process(double delta)
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
var playersSelecting = _gameManager.Players.Where(x => x.IsSelectingCharacter);
|
||||
foreach (var player in playersSelecting)
|
||||
|
||||
@@ -171,3 +171,11 @@ p2_altfire={
|
||||
[physics]
|
||||
|
||||
3d/default_gravity=0.0
|
||||
|
||||
[rendering]
|
||||
|
||||
textures/canvas_textures/default_texture_filter=0
|
||||
reflections/sky_reflections/texture_array_reflections=false
|
||||
environment/ssao/quality=0
|
||||
environment/ssil/quality=0
|
||||
environment/glow/upscale_mode=0
|
||||
|
||||
Reference in New Issue
Block a user