mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 08:45:33 +00:00
Boss patterns
This commit is contained in:
parent
5ef3e64413
commit
4541c5fbf4
7 changed files with 780 additions and 718 deletions
|
|
@ -37,7 +37,7 @@
|
|||
[ext_resource type="Material" uid="uid://br4foqdn2f8ge" path="res://textures/Manual/Wall_Corner.tres" id="27_c4mw0"]
|
||||
[ext_resource type="Material" uid="uid://bijkqqi8bqi3c" path="res://textures/Floors/Floor26.tres" id="28_btjo4"]
|
||||
[ext_resource type="Material" uid="uid://fc0n5jo05seu" path="res://textures/Manual/Wall_Light_Test.tres" id="30_pvlbf"]
|
||||
[ext_resource type="Material" uid="uid://dfs1tc2ry78pb" path="res://textures/Manual/Chevron.tres" id="30_um16p"]
|
||||
[ext_resource type="Material" path="res://textures/Manual/Chevron.tres" id="30_um16p"]
|
||||
[ext_resource type="Material" uid="uid://0x6sr7ehv4t1" path="res://textures/Floors/Floor167.tres" id="31_bbydx"]
|
||||
[ext_resource type="Script" uid="uid://crjplbs250g75" path="res://3D/TrenchBroom/EntityScripts/Lights/light_spot.gd" id="31_c2mph"]
|
||||
[ext_resource type="Material" uid="uid://l3g1l0y47c7r" path="res://textures/Manual/Electric_Panel_Wall.tres" id="32_k4tgc"]
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -13,7 +13,7 @@ rotationSpeed = 0.0
|
|||
_rotationOffset = 0.0
|
||||
duration = 2.0
|
||||
spread = 0.0
|
||||
burstInterval = 0.3
|
||||
burstInterval = 0.1
|
||||
ShotsPerBurst = 100
|
||||
BurstRate = 0.0
|
||||
_targetPlayer = true
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
[ext_resource type="Script" uid="uid://inasa76li3ym" path="res://Scripts/Resources/ScriptableBullets/BossScript.cs" id="2_t8f0y"]
|
||||
[ext_resource type="Resource" uid="uid://bmdxhsjh2qla6" path="res://Resources/BossPhases/Rumia/Rumia_NS_1_Chase.tres" id="3_ovn8y"]
|
||||
[ext_resource type="Resource" uid="uid://chcinoo8pkkwq" path="res://Resources/Patterns/Rumia_NS_2_3D.tres" id="5_mi6hp"]
|
||||
[ext_resource type="Script" uid="uid://cg7gi3tva4gvw" path="res://Scripts/AttackPatterns/WaitPattern.cs" id="6_xfnue"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_xfnue"]
|
||||
script = ExtResource("2_mi6hp")
|
||||
|
|
@ -24,21 +23,35 @@ moveDuration = 1.0
|
|||
RelativeToPlayer = false
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = true
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://fo8sf11p058s"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0t311"]
|
||||
script = ExtResource("6_xfnue")
|
||||
SecondsToWait = 2.0
|
||||
WaitForCompletion = true
|
||||
metadata/_custom_type_script = "uid://cg7gi3tva4gvw"
|
||||
[sub_resource type="Resource" id="Resource_ovn8y"]
|
||||
script = ExtResource("2_mi6hp")
|
||||
relativeTargetPosition = Vector2(4, 0)
|
||||
moveDuration = 2.0
|
||||
RelativeToPlayer = true
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://fo8sf11p058s"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_mi6hp"]
|
||||
script = ExtResource("2_mi6hp")
|
||||
relativeTargetPosition = Vector2(0, 0)
|
||||
moveDuration = 1.0
|
||||
RelativeToPlayer = false
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://fo8sf11p058s"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_l0s11"]
|
||||
script = ExtResource("1_k3wbt")
|
||||
PhaseName = ""
|
||||
Threshold = 0
|
||||
PlayAnimation = false
|
||||
Patterns = Array[Object]([SubResource("Resource_xfnue"), ExtResource("3_ovn8y"), SubResource("Resource_lrsat"), ExtResource("5_mi6hp"), SubResource("Resource_0t311")])
|
||||
Patterns = Array[Object]([SubResource("Resource_xfnue"), ExtResource("3_ovn8y"), ExtResource("5_mi6hp"), SubResource("Resource_lrsat"), ExtResource("3_ovn8y"), ExtResource("5_mi6hp"), SubResource("Resource_ovn8y"), ExtResource("3_ovn8y"), ExtResource("5_mi6hp"), SubResource("Resource_mi6hp"), ExtResource("3_ovn8y"), ExtResource("5_mi6hp")])
|
||||
metadata/_custom_type_script = "uid://cdd6q2h0t1hhq"
|
||||
|
||||
[resource]
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("1_22yix")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 10
|
||||
bulletCount = 14
|
||||
rotationSpeed = 120.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -35,7 +35,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("4_vxh5u")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 16
|
||||
bulletCount = 18
|
||||
rotationSpeed = 0.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -60,7 +60,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("4_vxh5u")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 16
|
||||
bulletCount = 18
|
||||
rotationSpeed = 60.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -85,7 +85,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("1_22yix")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 10
|
||||
bulletCount = 14
|
||||
rotationSpeed = 60.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -110,7 +110,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("1_22yix")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 10
|
||||
bulletCount = 14
|
||||
rotationSpeed = 60.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -135,7 +135,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("4_vxh5u")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 16
|
||||
bulletCount = 18
|
||||
rotationSpeed = 60.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
@ -160,7 +160,7 @@ metadata/_custom_type_script = "uid://bxiprx5nwmpnu"
|
|||
script = ExtResource("3_si5ca")
|
||||
BulletResource = ExtResource("1_22yix")
|
||||
EmitterOffset = Vector3(0, 0, 0)
|
||||
bulletCount = 10
|
||||
bulletCount = 14
|
||||
rotationSpeed = 60.0
|
||||
_rotationOffset = 0.0
|
||||
duration = 0.4
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ using Godot;
|
|||
namespace Cirno.Scripts.Actors;
|
||||
|
||||
[Tool]
|
||||
public partial class EnemyMarker3D : PreviewMarker3D
|
||||
public partial class EnemyMarker3D : PreviewMarker3D, IActivable
|
||||
{
|
||||
private EnemyResource _enemy;
|
||||
|
||||
|
||||
[Export]
|
||||
public EnemyResource Enemy
|
||||
{
|
||||
|
|
@ -25,10 +25,32 @@ public partial class EnemyMarker3D : PreviewMarker3D
|
|||
}
|
||||
}
|
||||
|
||||
[Export] public bool AutoSpawn { get; set; } = false;
|
||||
|
||||
private bool _autoSpawn = false;
|
||||
|
||||
[Export]
|
||||
public bool AutoSpawn
|
||||
{
|
||||
get => _autoSpawn;
|
||||
set
|
||||
{
|
||||
_autoSpawn = value;
|
||||
if (Engine.IsEditorHint())
|
||||
{
|
||||
if (_autoSpawn)
|
||||
{
|
||||
SetSpriteAlpha(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSpriteAlpha(0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private EnemyProxy3D _spawnedEnemy;
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
base._Ready();
|
||||
|
|
@ -38,10 +60,10 @@ public partial class EnemyMarker3D : PreviewMarker3D
|
|||
Spawn(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public EnemyProxy3D Spawn(bool deleteMarker)
|
||||
{
|
||||
if (Engine.IsEditorHint()) return null ;
|
||||
if (Engine.IsEditorHint()) return null;
|
||||
if (Enemy is null) return null;
|
||||
if (_spawnedEnemy is not null) return _spawnedEnemy;
|
||||
|
||||
|
|
@ -49,21 +71,33 @@ public partial class EnemyMarker3D : PreviewMarker3D
|
|||
{
|
||||
this.QueueFree();
|
||||
}
|
||||
|
||||
|
||||
var enemyScene = GD.Load<PackedScene>(Enemy.PrefabPath);
|
||||
|
||||
|
||||
_spawnedEnemy = this.CreateSibling<EnemyProxy3D>(enemyScene);
|
||||
_spawnedEnemy.Init(Enemy);
|
||||
//Spawned = true;
|
||||
|
||||
|
||||
_spawnedEnemy.Death += SpawnedEnemyOnDeath;
|
||||
return _spawnedEnemy;
|
||||
}
|
||||
|
||||
|
||||
private void SpawnedEnemyOnDeath(EnemyProxy3D enemy)
|
||||
{
|
||||
_spawnedEnemy.Death -= SpawnedEnemyOnDeath;
|
||||
_spawnedEnemy = null;
|
||||
//Spawned = false;
|
||||
}
|
||||
|
||||
public bool Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
if (Engine.IsEditorHint()) return false;
|
||||
Spawn(false);
|
||||
return _spawnedEnemy is not null;
|
||||
}
|
||||
|
||||
public void Toggle()
|
||||
{
|
||||
Activate();
|
||||
}
|
||||
}
|
||||
|
|
@ -118,7 +118,19 @@ public partial class PreviewMarker3D : Marker3D
|
|||
_sprite.SetBillboardMode(Billboard ? BaseMaterial3D.BillboardModeEnum.Enabled : BaseMaterial3D.BillboardModeEnum.Disabled);
|
||||
_sprite.TextureFilter = BaseMaterial3D.TextureFilterEnum.Nearest;
|
||||
_sprite.PixelSize = PixelSize;
|
||||
|
||||
}
|
||||
|
||||
protected void SetSpriteAlpha(float alpha)
|
||||
{
|
||||
if (!Engine.IsEditorHint()) return;
|
||||
if (_sprite is not null)
|
||||
{
|
||||
GD.Print($"Modulating sprite to {alpha}");
|
||||
_sprite.SetModulate(new Color(_sprite.Modulate.R, _sprite.Modulate.G, _sprite.Modulate.B, alpha));
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.Print("Sprite was null");
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue