mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
Triggerable acid
This commit is contained in:
parent
e85a4afa3f
commit
796f70b69a
16 changed files with 1329 additions and 968 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -7,14 +7,14 @@
|
|||
script = ExtResource("2_5u7ls")
|
||||
spawn_type = 2
|
||||
origin_type = 4
|
||||
build_visuals = false
|
||||
build_visuals = true
|
||||
use_in_baked_light = false
|
||||
shadow_casting_setting = 0
|
||||
build_occlusion = false
|
||||
render_layers = 0
|
||||
build_occlusion = true
|
||||
render_layers = 1
|
||||
collision_shape_type = 1
|
||||
collision_layer = 4
|
||||
collision_mask = 4
|
||||
collision_layer = 256
|
||||
collision_mask = 2
|
||||
collision_priority = 1.0
|
||||
collision_shape_margin = 0.04
|
||||
add_textures_metadata = false
|
||||
|
|
@ -30,7 +30,7 @@ class_properties = {}
|
|||
class_property_descriptions = {}
|
||||
auto_apply_to_matching_node_properties = false
|
||||
meta_properties = {
|
||||
"color": Color(0.8, 0, 0.8, 1)
|
||||
"color": Color(0, 0.593146, 0.297832, 1)
|
||||
}
|
||||
node_class = "Area3D"
|
||||
name_property = ""
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=7 format=3 uid="uid://dgkdkac8ppgnq"]
|
||||
[gd_resource type="Resource" script_class="FuncGodotFGDFile" load_steps=8 format=3 uid="uid://dgkdkac8ppgnq"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cknmd0lgmorx2" path="res://addons/func_godot/src/fgd/func_godot_fgd_file.gd" id="1_jws5j"]
|
||||
[ext_resource type="Resource" uid="uid://cxy7jnh6d7msn" path="res://addons/func_godot/fgd/func_detail.tres" id="1_rbohd"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Resource" uid="uid://b70vf4t5dc70t" path="res://addons/func_godot/fgd/func_geo.tres" id="3_ire2f"]
|
||||
[ext_resource type="Resource" uid="uid://dg5x44cc7flew" path="res://addons/func_godot/fgd/func_illusionary.tres" id="4_h7bc3"]
|
||||
[ext_resource type="Resource" uid="uid://cqyc33bbc701f" path="res://3D/TrenchBroom/EntityDefinitions/solid/triggers/trigger_area.tres" id="5_1pqwq"]
|
||||
[ext_resource type="Resource" uid="uid://c2x5nns4yv5y1" path="res://3D/TrenchBroom/EntityDefinitions/solid/Brush/acid_area.tres" id="6_ire2f"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_jws5j")
|
||||
|
|
@ -13,5 +14,5 @@ export_file = false
|
|||
target_map_editor = 1
|
||||
fgd_name = "FuncGodot"
|
||||
base_fgd_files = Array[Resource]([])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3"), ExtResource("5_1pqwq")])
|
||||
entity_definitions = Array[Resource]([ExtResource("1_rbohd"), ExtResource("2_1pqwq"), ExtResource("3_ire2f"), ExtResource("4_h7bc3"), ExtResource("5_1pqwq"), ExtResource("6_ire2f")])
|
||||
metadata/_custom_type_script = "uid://cknmd0lgmorx2"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=24 format=3 uid="uid://rimplblbptcd"]
|
||||
[gd_scene load_steps=27 format=3 uid="uid://rimplblbptcd"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://88smibkin17p" path="res://Scripts/Components/FSM/3DPlayer/IsoPlayerFSMProxy.cs" id="1_cc7e7"]
|
||||
[ext_resource type="Texture2D" uid="uid://ddwhrlrgj6i00" path="res://Sprites/Actors/Cirno.png" id="1_vex34"]
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
[ext_resource type="Script" uid="uid://y35vqx1ifo52" path="res://Scripts/Components/FSM/3DPlayer/Init.cs" id="2_3oyrx"]
|
||||
[ext_resource type="Script" uid="uid://d3ydlcdm8m3tg" path="res://Scripts/Components/FSM/3DPlayer/Active.cs" id="3_cc7e7"]
|
||||
[ext_resource type="Script" uid="uid://c5brx3ail1tlh" path="res://Scripts/Components/FSM/3DPlayer/IsoMovementModule.cs" id="5_fg04g"]
|
||||
[ext_resource type="Script" uid="uid://cmafvigtkg2qo" path="res://Scripts/Components/FSM/3DPlayer/Dead.cs" id="5_ok250"]
|
||||
[ext_resource type="Script" uid="uid://eop2ue3otxcs" path="res://Scripts/Components/FSM/3DPlayer/IsoPlayerStorageModule.cs" id="6_habpy"]
|
||||
[ext_resource type="Script" uid="uid://dq338w2lw5phl" path="res://Scripts/Components/Actors/KeyboardInputProvider.cs" id="7_4cdxq"]
|
||||
[ext_resource type="Script" uid="uid://1fryvj4omkin" path="res://Scripts/Components/Actors/MouseAimProvider3D.cs" id="9_2ffwi"]
|
||||
|
|
@ -18,6 +19,7 @@
|
|||
[ext_resource type="Script" uid="uid://d2psafx4f3f58" path="res://Scripts/Components/FSM/3DPlayer/PlayerWeaponModule3D.cs" id="15_el8as"]
|
||||
[ext_resource type="Script" uid="uid://by0x0qmbmkoak" path="res://Scripts/Components/FSM/3DPlayer/PlayerWeaponProvider3D.cs" id="16_olwak"]
|
||||
[ext_resource type="PackedScene" uid="uid://cfgc6ik8vb08c" path="res://Scenes/Weapons/BaseWeapon_3D.tscn" id="17_olwak"]
|
||||
[ext_resource type="Script" uid="uid://cqyr8mko8oo5" path="res://Scripts/Components/FSM/3DPlayer/PlayerAcidDeathModule.cs" id="19_7selo"]
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_fg04g"]
|
||||
radius = 0.349554
|
||||
|
|
@ -39,6 +41,8 @@ height = 0.679688
|
|||
height = 1.0415
|
||||
radius = 1.5708
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_ok250"]
|
||||
|
||||
[node name="IsoPlayerFsm" type="CharacterBody3D" node_paths=PackedStringArray("PlayerFSM")]
|
||||
collision_layer = 2
|
||||
collision_mask = 17
|
||||
|
|
@ -53,7 +57,10 @@ script = ExtResource("2_3oyrx")
|
|||
|
||||
[node name="Active" type="Node" parent="StateMachine" node_paths=PackedStringArray("_moduleNodes")]
|
||||
script = ExtResource("3_cc7e7")
|
||||
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), NodePath("../../ShadowModule"), NodePath("../../InteractionController"), NodePath("../../ActivationProvider"), NodePath("../../WeaponModule")]
|
||||
_moduleNodes = [NodePath("../../InputProvider"), NodePath("../../MovementModule"), NodePath("../../ShadowModule"), NodePath("../../InteractionController"), NodePath("../../ActivationProvider"), NodePath("../../WeaponModule"), NodePath("../../AcidDeathModule")]
|
||||
|
||||
[node name="Dead" type="Node" parent="StateMachine"]
|
||||
script = ExtResource("5_ok250")
|
||||
|
||||
[node name="Sprite" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.707107, -0.5, 0.5, 0, 0.707107, 0.707107, -0.707107, -0.5, 0.5, 0, 0, 0)
|
||||
|
|
@ -147,3 +154,15 @@ StorageModule = NodePath("../../Storage")
|
|||
WeaponTemplate = ExtResource("17_olwak")
|
||||
WeaponRightOffset = NodePath("../../WeaponOffset")
|
||||
WeaponLeftOffset = NodePath("../../WeaponOffset")
|
||||
|
||||
[node name="AcidDeathModule" type="Node" parent="."]
|
||||
script = ExtResource("19_7selo")
|
||||
|
||||
[node name="AcidDetector" type="Area3D" parent="."]
|
||||
collision_layer = 2
|
||||
collision_mask = 256
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="AcidDetector"]
|
||||
shape = SubResource("SphereShape3D_ok250")
|
||||
|
||||
[connection signal="area_entered" from="AcidDetector" to="AcidDeathModule" method="OnAcidCollision"]
|
||||
|
|
|
|||
|
|
@ -40,6 +40,9 @@ public partial class Active : BaseState<PlayerState, CharacterBody3D>
|
|||
public override void EnterState()
|
||||
{
|
||||
base.EnterState();
|
||||
|
||||
MainObject.Show();
|
||||
|
||||
// enable sprite
|
||||
// enable crosshair
|
||||
//_crosshairProvider.Show();
|
||||
|
|
|
|||
29
Scripts/Components/FSM/3DPlayer/Dead.cs
Normal file
29
Scripts/Components/FSM/3DPlayer/Dead.cs
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
||||
public partial class Dead : BaseState<PlayerState, CharacterBody3D>
|
||||
{
|
||||
public override PlayerState StateId => PlayerState.Dead;
|
||||
|
||||
public override void EnterState()
|
||||
{
|
||||
base.EnterState();
|
||||
MainObject.Hide();
|
||||
}
|
||||
|
||||
public override void ExitState()
|
||||
{
|
||||
base.ExitState();
|
||||
}
|
||||
|
||||
public override void PhysicsProcessState(double delta)
|
||||
{
|
||||
base.PhysicsProcessState(delta);
|
||||
}
|
||||
|
||||
public override void ProcessState(double delta)
|
||||
{
|
||||
base.ProcessState(delta);
|
||||
}
|
||||
}
|
||||
1
Scripts/Components/FSM/3DPlayer/Dead.cs.uid
Normal file
1
Scripts/Components/FSM/3DPlayer/Dead.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cmafvigtkg2qo
|
||||
43
Scripts/Components/FSM/3DPlayer/PlayerAcidDeathModule.cs
Normal file
43
Scripts/Components/FSM/3DPlayer/PlayerAcidDeathModule.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
||||
public partial class PlayerAcidDeathModule : ModuleBase<PlayerState, CharacterBody3D>
|
||||
{
|
||||
private IStateMachine<PlayerState, CharacterBody3D> _stateMachine;
|
||||
private CharacterBody3D MainObject => _stateMachine.MainObject;
|
||||
|
||||
private bool _enabled = false;
|
||||
|
||||
public override void EnterState(PlayerState state)
|
||||
{
|
||||
_enabled = true;
|
||||
}
|
||||
|
||||
public override void ExitState(PlayerState state)
|
||||
{
|
||||
_enabled = false;
|
||||
}
|
||||
|
||||
public override void Init(IStateMachine<PlayerState, CharacterBody3D> machine)
|
||||
{
|
||||
_stateMachine = machine;
|
||||
}
|
||||
|
||||
public override void Process(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void PhysicsProcess(double delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void OnAcidCollision(Area3D area)
|
||||
{
|
||||
if (!_enabled) return;
|
||||
GD.Print("Oh no acid");
|
||||
_stateMachine.SetState(PlayerState.Dead);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cqyr8mko8oo5
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Components.FSM._3DPlayer;
|
||||
|
||||
public partial class PlayerAcidDetectionProvider : Area2D
|
||||
{
|
||||
// [Signal]
|
||||
// public delegate void AcidCollisionEventHandler();
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://brykay86akqhq
|
||||
|
|
@ -397,6 +397,7 @@ locale/translations=PackedStringArray("res://Dialogue/Translations/dialogic_char
|
|||
2d_physics/layer_8="EnemyBullets"
|
||||
3d_physics/layer_8="EnemyBullets"
|
||||
2d_physics/layer_9="Acid"
|
||||
3d_physics/layer_9="Acid"
|
||||
2d_physics/layer_10="Conveyor"
|
||||
|
||||
[navigation]
|
||||
|
|
|
|||
8
textures/Manual/Wall_Lab_Blue.tres
Normal file
8
textures/Manual/Wall_Lab_Blue.tres
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="StandardMaterial3D" load_steps=2 format=3 uid="uid://sr0slxivn8gp"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://lca11ec35yij" path="res://textures/Manual/Wall_Lab_Blue.png" id="1_xjcps"]
|
||||
|
||||
[resource]
|
||||
albedo_texture = ExtResource("1_xjcps")
|
||||
metallic_specular = 0.0
|
||||
texture_filter = 2
|
||||
Loading…
Add table
Add a link
Reference in a new issue