init
This commit is contained in:
61
scenes/enemy.tscn
Normal file
61
scenes/enemy.tscn
Normal file
@@ -0,0 +1,61 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dcyxfspptvuqn"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://8vuywuv7ebsl" path="res://scripts/enemy.gd" id="1_enemy"]
|
||||
[ext_resource type="Script" path="res://scripts/enemy_health_bar.gd" id="2_health_bar"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://c82de86x4ho25" path="res://models/Crystal Golem Behemot/Meshy_AI_Crystal_Golem_Behemot_0110152107_texture.obj" id="3_enemy"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]
|
||||
radius = 1.5
|
||||
height = 5.0
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_1"]
|
||||
size = Vector3(3, 0.2, 0.05)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
|
||||
albedo_color = Color(0.5, 0, 0, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0.8, 0, 0, 1)
|
||||
emission_energy_multiplier = 2.0
|
||||
shading_mode = 0
|
||||
flags_unshaded = true
|
||||
flags_transparent = false
|
||||
depth_draw_mode = 2
|
||||
render_priority = 1
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_2"]
|
||||
size = Vector3(3, 0.2, 0.05)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2"]
|
||||
albedo_color = Color(0, 1, 0, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(0, 1, 0, 1)
|
||||
emission_energy_multiplier = 2.0
|
||||
shading_mode = 0
|
||||
flags_unshaded = true
|
||||
flags_transparent = false
|
||||
depth_draw_mode = 2
|
||||
render_priority = 2
|
||||
|
||||
[node name="Enemy" type="CharacterBody3D"]
|
||||
script = ExtResource("1_enemy")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(2.5, 0, 0, 0, 2.5, 0, 0, 0, 2.5, 0, 2.6208835, 0)
|
||||
mesh = ExtResource("3_enemy")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.5, 0)
|
||||
shape = SubResource("CapsuleShape3D_1")
|
||||
|
||||
[node name="HealthBarContainer" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 5.5, 0)
|
||||
script = ExtResource("2_health_bar")
|
||||
|
||||
[node name="BackgroundBar" type="MeshInstance3D" parent="HealthBarContainer"]
|
||||
mesh = SubResource("BoxMesh_1")
|
||||
material_override = SubResource("StandardMaterial3D_1")
|
||||
|
||||
[node name="HealthBar" type="MeshInstance3D" parent="HealthBarContainer"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.01)
|
||||
mesh = SubResource("BoxMesh_2")
|
||||
material_override = SubResource("StandardMaterial3D_2")
|
||||
104
scenes/hud.tscn
Normal file
104
scenes/hud.tscn
Normal file
@@ -0,0 +1,104 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://hud"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/hud.gd" id="1_hud"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
|
||||
bg_color = Color(0.2, 0, 0, 0.8)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2"]
|
||||
bg_color = Color(0, 0.8, 0, 0.8)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3"]
|
||||
bg_color = Color(0.2, 0.2, 0.2, 0.8)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4"]
|
||||
bg_color = Color(0.2, 0.6, 1, 0.8)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="HUD" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_hud")
|
||||
|
||||
[node name="HealthBar" type="ProgressBar" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 20.0
|
||||
offset_top = -60.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = -20.0
|
||||
grow_vertical = 0
|
||||
max_value = 100.0
|
||||
value = 100.0
|
||||
show_percentage = false
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_1")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_2")
|
||||
|
||||
[node name="HealthLabel" type="Label" parent="HealthBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
text = "HP: 100 / 100"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="DashCooldownBar" type="ProgressBar" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 20.0
|
||||
offset_top = -120.0
|
||||
offset_right = 320.0
|
||||
offset_bottom = -80.0
|
||||
grow_vertical = 0
|
||||
max_value = 100.0
|
||||
value = 100.0
|
||||
show_percentage = false
|
||||
theme_override_styles/background = SubResource("StyleBoxFlat_3")
|
||||
theme_override_styles/fill = SubResource("StyleBoxFlat_4")
|
||||
|
||||
[node name="DashCooldownLabel" type="Label" parent="DashCooldownBar"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_shadow_color = Color(0, 0, 0, 1)
|
||||
theme_override_constants/shadow_offset_x = 2
|
||||
theme_override_constants/shadow_offset_y = 2
|
||||
text = "Рывок: готов (Пробел)"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
60
scenes/main.tscn
Normal file
60
scenes/main.tscn
Normal file
@@ -0,0 +1,60 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://c64bxmqeaaaku"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://player" path="res://scenes/player.tscn" id="1_main"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/enemy.tscn" id="2_main"]
|
||||
[ext_resource type="Script" uid="uid://28onm6d36qbo" path="res://scripts/camera_controller.gd" id="3_main"]
|
||||
[ext_resource type="PackedScene" path="res://scenes/hud.tscn" id="4_main"]
|
||||
|
||||
[sub_resource type="PlaneMesh" id="PlaneMesh_1"]
|
||||
size = Vector2(50, 50)
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
|
||||
albedo_color = Color(0.2, 0.2, 0.2, 1)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_1"]
|
||||
size = Vector3(50, 0.1, 50)
|
||||
|
||||
[node name="Main" type="Node3D"]
|
||||
|
||||
[node name="Ground" type="StaticBody3D" parent="."]
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="Ground"]
|
||||
mesh = SubResource("PlaneMesh_1")
|
||||
surface_material_override/0 = SubResource("StandardMaterial3D_1")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="Ground"]
|
||||
shape = SubResource("BoxShape3D_1")
|
||||
|
||||
[node name="Player" parent="." instance=ExtResource("1_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5.2521453, 1, 12.966181)
|
||||
|
||||
[node name="Enemies" type="Node3D" parent="."]
|
||||
|
||||
[node name="Enemy1" parent="Enemies" instance=ExtResource("2_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 13.720226, 1, 5)
|
||||
|
||||
[node name="Enemy2" parent="Enemies" instance=ExtResource("2_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 1, 5)
|
||||
|
||||
[node name="Enemy3" parent="Enemies" instance=ExtResource("2_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 1, -5)
|
||||
|
||||
[node name="Enemy4" parent="Enemies" instance=ExtResource("2_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 1, -5)
|
||||
|
||||
[node name="Enemy5" parent="Enemies" instance=ExtResource("2_main")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 8)
|
||||
|
||||
[node name="CameraController" type="Node3D" parent="."]
|
||||
script = ExtResource("3_main")
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="CameraController"]
|
||||
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 15, 15)
|
||||
current = true
|
||||
fov = 60.0
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||
transform = Transform3D(0.866025, -0.433013, 0.25, 0, 0.5, 0.866025, -0.5, -0.75, 0.433013, 0, 10, 0)
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="HUD" parent="." instance=ExtResource("4_main")]
|
||||
99
scenes/main_menu.tscn
Normal file
99
scenes/main_menu.tscn
Normal file
@@ -0,0 +1,99 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://main_menu"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/main_menu.gd" id="1_menu"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_1"]
|
||||
bg_color = Color(0.2, 0.2, 0.2, 0.8)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2"]
|
||||
bg_color = Color(0.3, 0.3, 0.4, 0.9)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3"]
|
||||
bg_color = Color(0.15, 0.15, 0.25, 0.9)
|
||||
corner_radius_top_left = 5
|
||||
corner_radius_top_right = 5
|
||||
corner_radius_bottom_right = 5
|
||||
corner_radius_bottom_left = 5
|
||||
|
||||
[node name="MainMenu" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_menu")
|
||||
|
||||
[node name="Background" type="ColorRect" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0.1, 0.1, 0.15, 1)
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -150.0
|
||||
offset_top = -120.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = 120.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Title" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 48
|
||||
text = "Action Rog"
|
||||
horizontal_alignment = 1
|
||||
|
||||
[node name="HSeparator" type="HSeparator" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="StartButton" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(200, 40)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_1")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_2")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_3")
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(0.9, 0.9, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0.7, 0.7, 0.9, 1)
|
||||
text = "Начать игру"
|
||||
|
||||
[node name="SettingsButton" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(200, 40)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_1")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_2")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_3")
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(0.9, 0.9, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0.7, 0.7, 0.9, 1)
|
||||
text = "Настройки"
|
||||
|
||||
[node name="QuitButton" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
custom_minimum_size = Vector2(200, 40)
|
||||
theme_override_styles/normal = SubResource("StyleBoxFlat_1")
|
||||
theme_override_styles/hover = SubResource("StyleBoxFlat_2")
|
||||
theme_override_styles/pressed = SubResource("StyleBoxFlat_3")
|
||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
||||
theme_override_colors/font_hover_color = Color(0.9, 0.9, 1, 1)
|
||||
theme_override_colors/font_pressed_color = Color(0.7, 0.7, 0.9, 1)
|
||||
text = "Выход"
|
||||
|
||||
113
scenes/parabolic_projectile.tscn
Normal file
113
scenes/parabolic_projectile.tscn
Normal file
@@ -0,0 +1,113 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cwte6nc4bxak0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d3c5g160kh3vv" path="res://scripts/parabolic_projectile.gd" id="1_parabolic"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
|
||||
albedo_color = Color(1, 0.4, 0.1, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.3, 0, 1)
|
||||
emission_energy_multiplier = 4.0
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_1"]
|
||||
radius = 0.3
|
||||
height = 0.6
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_1"]
|
||||
radius = 0.3
|
||||
height = 0.6
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_1"]
|
||||
direction = Vector3(0, 0, -1)
|
||||
initial_velocity_min = 2.0
|
||||
initial_velocity_max = 5.0
|
||||
gravity = Vector3(0, -2, 0)
|
||||
scale_min = 0.15
|
||||
scale_max = 0.25
|
||||
color = Color(1, 0.5, 0, 1)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2"]
|
||||
direction = Vector3(0, 0, -1)
|
||||
initial_velocity_min = 1.0
|
||||
initial_velocity_max = 3.0
|
||||
gravity = Vector3(0, -1, 0)
|
||||
scale_min = 0.08
|
||||
scale_max = 0.18
|
||||
color = Color(1, 0.3, 0, 0.8)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_3"]
|
||||
direction = Vector3(0, 1, 0)
|
||||
spread = 180.0
|
||||
initial_velocity_min = 5.0
|
||||
initial_velocity_max = 10.0
|
||||
gravity = Vector3(0, -5, 0)
|
||||
scale_min = 0.1
|
||||
scale_max = 0.25
|
||||
scale_over_velocity_min = 0.05
|
||||
scale_over_velocity_max = 0.15
|
||||
color = Color(1, 0.6, 0.1, 1)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_4"]
|
||||
direction = Vector3(0, 1, 0)
|
||||
initial_velocity_min = 1.5
|
||||
initial_velocity_max = 3.0
|
||||
gravity = Vector3(0, -2, 0)
|
||||
scale_min = 0.15
|
||||
scale_max = 0.3
|
||||
color = Color(1, 0.8, 0.2, 1)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_5"]
|
||||
direction = Vector3(0, 1, 0)
|
||||
spread = 90.0
|
||||
initial_velocity_min = 2.0
|
||||
initial_velocity_max = 4.0
|
||||
gravity = Vector3(0, -1, 0)
|
||||
scale_min = 0.2
|
||||
scale_max = 0.4
|
||||
color = Color(0.3, 0.3, 0.3, 0.6)
|
||||
|
||||
[node name="ParabolicProjectile" type="Area3D"]
|
||||
script = ExtResource("1_parabolic")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
material_override = SubResource("StandardMaterial3D_1")
|
||||
mesh = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("CapsuleShape3D_1")
|
||||
|
||||
[node name="FireParticles" type="GPUParticles3D" parent="."]
|
||||
amount = 40
|
||||
lifetime = 0.4
|
||||
process_material = SubResource("ParticleProcessMaterial_1")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="TrailParticles" type="GPUParticles3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.4)
|
||||
amount = 60
|
||||
lifetime = 0.6
|
||||
process_material = SubResource("ParticleProcessMaterial_2")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="ExplosionParticles" type="GPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
amount = 80
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_3")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="ExplosionCore" type="GPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
amount = 30
|
||||
lifetime = 0.4
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_4")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="ExplosionSmoke" type="GPUParticles3D" parent="."]
|
||||
emitting = false
|
||||
amount = 40
|
||||
lifetime = 0.5
|
||||
one_shot = true
|
||||
process_material = SubResource("ParticleProcessMaterial_5")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
23
scenes/player.tscn
Normal file
23
scenes/player.tscn
Normal file
@@ -0,0 +1,23 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://player"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bt4nfjnngh21i" path="res://scripts/player.gd" id="1_player"]
|
||||
[ext_resource type="PackedScene" uid="uid://q46fjntx43e2" path="res://scenes/straight_projectile.tscn" id="2_player"]
|
||||
[ext_resource type="PackedScene" uid="uid://cwte6nc4bxak0" path="res://scenes/parabolic_projectile.tscn" id="3_player"]
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_1"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_1"]
|
||||
|
||||
[node name="Player" type="CharacterBody3D" groups=["player"]]
|
||||
script = ExtResource("1_player")
|
||||
straight_projectile_scene = ExtResource("2_player")
|
||||
parabolic_projectile_scene = ExtResource("3_player")
|
||||
speed = 15.0
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
mesh = SubResource("BoxMesh_1")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
shape = SubResource("BoxShape3D_1")
|
||||
57
scenes/straight_projectile.tscn
Normal file
57
scenes/straight_projectile.tscn
Normal file
@@ -0,0 +1,57 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://q46fjntx43e2"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://crsltf0vxq1xd" path="res://scripts/straight_projectile.gd" id="1_straight"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1"]
|
||||
albedo_color = Color(1, 0.6, 0.2, 1)
|
||||
emission_enabled = true
|
||||
emission = Color(1, 0.4, 0, 1)
|
||||
emission_energy_multiplier = 3.0
|
||||
|
||||
[sub_resource type="SphereMesh" id="SphereMesh_1"]
|
||||
radius = 0.2
|
||||
height = 0.6
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_1"]
|
||||
radius = 0.2
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_1"]
|
||||
direction = Vector3(0, 0, -1)
|
||||
initial_velocity_min = 2.0
|
||||
initial_velocity_max = 4.0
|
||||
gravity = Vector3(0, -2, 0)
|
||||
scale_min = 0.1
|
||||
scale_max = 0.2
|
||||
color = Color(1, 0.5, 0, 1)
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2"]
|
||||
direction = Vector3(0, 0, -1)
|
||||
initial_velocity_min = 1.0
|
||||
initial_velocity_max = 2.0
|
||||
gravity = Vector3(0, -1, 0)
|
||||
scale_min = 0.05
|
||||
scale_max = 0.15
|
||||
color = Color(1, 0.3, 0, 0.8)
|
||||
|
||||
[node name="StraightProjectile" type="Area3D"]
|
||||
script = ExtResource("1_straight")
|
||||
|
||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
||||
material_override = SubResource("StandardMaterial3D_1")
|
||||
mesh = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_1")
|
||||
|
||||
[node name="FireParticles" type="GPUParticles3D" parent="."]
|
||||
amount = 30
|
||||
lifetime = 0.3
|
||||
process_material = SubResource("ParticleProcessMaterial_1")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
|
||||
[node name="TrailParticles" type="GPUParticles3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.3)
|
||||
amount = 50
|
||||
lifetime = 0.5
|
||||
process_material = SubResource("ParticleProcessMaterial_2")
|
||||
draw_pass_1 = SubResource("SphereMesh_1")
|
||||
Reference in New Issue
Block a user