mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:55:35 +00:00
Fixed Rumia's SP1
This commit is contained in:
parent
dc8777c3d9
commit
388acdba04
5 changed files with 90 additions and 33 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="BossPhase" load_steps=20 format=3 uid="uid://ccj0cqbveey8c"]
|
||||
[gd_resource type="Resource" script_class="BossPhase" load_steps=24 format=3 uid="uid://ccj0cqbveey8c"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bhc7rbcico4kp" path="res://Scripts/Resources/SimpleMovementPattern.cs" id="1_lw82i"]
|
||||
[ext_resource type="PackedScene" uid="uid://dohakkayqj4w2" path="res://Scenes/Weapons/Bullets/enemyBullet_green.tscn" id="1_o4um1"]
|
||||
|
|
@ -18,6 +18,15 @@ transitionType = 1
|
|||
easeType = 2
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_763gk"]
|
||||
script = ExtResource("1_lw82i")
|
||||
relativeTargetPosition = Vector2(-16, 0)
|
||||
moveDuration = 2.0
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://bhc7rbcico4kp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_80ngy"]
|
||||
script = ExtResource("3_606tl")
|
||||
ModifierType = 1
|
||||
|
|
@ -29,7 +38,7 @@ ScalingFactor = 10.0
|
|||
[sub_resource type="Resource" id="Resource_2o6nd"]
|
||||
script = ExtResource("4_juoir")
|
||||
BulletScene = ExtResource("1_o4um1")
|
||||
BulletSpeed = 80.0
|
||||
BulletSpeed = 100.0
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 20.0
|
||||
LifeTime = 20.0
|
||||
|
|
@ -45,10 +54,10 @@ script = ExtResource("2_7268a")
|
|||
BulletResource = SubResource("Resource_2o6nd")
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
_rotationOffset = 45.0
|
||||
duration = 1.0
|
||||
_rotationOffset = 10.0
|
||||
duration = 0.8
|
||||
spread = 180.0
|
||||
burstInterval = 1.0
|
||||
burstInterval = 0.4
|
||||
ShotsPerBurst = 100
|
||||
BurstRate = 0.0
|
||||
_targetPlayer = false
|
||||
|
|
@ -73,7 +82,7 @@ ScalingFactor = 10.0
|
|||
[sub_resource type="Resource" id="Resource_j7r4h"]
|
||||
script = ExtResource("4_juoir")
|
||||
BulletScene = ExtResource("4_ruawj")
|
||||
BulletSpeed = 80.0
|
||||
BulletSpeed = 100.0
|
||||
Direction = Vector2(1, 0)
|
||||
BulletDamage = 20.0
|
||||
LifeTime = 20.0
|
||||
|
|
@ -89,10 +98,10 @@ script = ExtResource("2_7268a")
|
|||
BulletResource = SubResource("Resource_j7r4h")
|
||||
bulletCount = 12
|
||||
rotationSpeed = 0.0
|
||||
_rotationOffset = -45.0
|
||||
duration = 1.0
|
||||
_rotationOffset = -10.0
|
||||
duration = 0.8
|
||||
spread = 180.0
|
||||
burstInterval = 1.0
|
||||
burstInterval = 0.4
|
||||
ShotsPerBurst = 100
|
||||
BurstRate = 0.0
|
||||
_targetPlayer = false
|
||||
|
|
@ -108,7 +117,7 @@ WaitForCompletion = true
|
|||
|
||||
[sub_resource type="Resource" id="Resource_gm1rv"]
|
||||
script = ExtResource("6_6mg1u")
|
||||
patterns = Array[Resource]([SubResource("Resource_0v4v8"), SubResource("Resource_7yi74"), SubResource("Resource_0v4v8"), SubResource("Resource_7yi74"), SubResource("Resource_0v4v8"), SubResource("Resource_7yi74")])
|
||||
patterns = Array[Resource]([SubResource("Resource_0v4v8"), SubResource("Resource_7yi74")])
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_5fq8v"]
|
||||
|
|
@ -119,6 +128,24 @@ transitionType = 1
|
|||
easeType = 2
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_t38ne"]
|
||||
script = ExtResource("1_lw82i")
|
||||
relativeTargetPosition = Vector2(-40, 0)
|
||||
moveDuration = 2.0
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://bhc7rbcico4kp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_rt3ub"]
|
||||
script = ExtResource("1_lw82i")
|
||||
relativeTargetPosition = Vector2(16, 0)
|
||||
moveDuration = 2.0
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://bhc7rbcico4kp"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_nl664"]
|
||||
script = ExtResource("1_lw82i")
|
||||
relativeTargetPosition = Vector2(50, 5)
|
||||
|
|
@ -127,9 +154,18 @@ transitionType = 1
|
|||
easeType = 2
|
||||
WaitForCompletion = true
|
||||
|
||||
[sub_resource type="Resource" id="Resource_18vjq"]
|
||||
script = ExtResource("1_lw82i")
|
||||
relativeTargetPosition = Vector2(40, 0)
|
||||
moveDuration = 2.0
|
||||
transitionType = 0
|
||||
easeType = 2
|
||||
WaitForCompletion = false
|
||||
metadata/_custom_type_script = "uid://bhc7rbcico4kp"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("3_o6234")
|
||||
PhaseName = "Night Sign \"Night Bird\""
|
||||
Threshold = 100
|
||||
PlayAnimation = true
|
||||
Patterns = Array[Resource]([SubResource("Resource_upj22"), SubResource("Resource_gm1rv"), SubResource("Resource_5fq8v"), SubResource("Resource_gm1rv"), SubResource("Resource_upj22"), SubResource("Resource_gm1rv"), SubResource("Resource_nl664"), SubResource("Resource_gm1rv")])
|
||||
Patterns = Array[Resource]([SubResource("Resource_upj22"), SubResource("Resource_763gk"), SubResource("Resource_gm1rv"), SubResource("Resource_gm1rv"), SubResource("Resource_5fq8v"), SubResource("Resource_t38ne"), SubResource("Resource_gm1rv"), SubResource("Resource_gm1rv"), SubResource("Resource_upj22"), SubResource("Resource_rt3ub"), SubResource("Resource_gm1rv"), SubResource("Resource_gm1rv"), SubResource("Resource_nl664"), SubResource("Resource_18vjq"), SubResource("Resource_gm1rv"), SubResource("Resource_gm1rv")])
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
[gd_scene load_steps=140 format=4 uid="uid://bv451a8wgty4u"]
|
||||
[gd_scene load_steps=141 format=4 uid="uid://bv451a8wgty4u"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://doxmbokehw8ci" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://c4pr2707hbeph" path="res://Scenes/Actors/fsm_player.tscn" id="2_ksslq"]
|
||||
|
|
@ -104,6 +104,7 @@
|
|||
[ext_resource type="Resource" uid="uid://bj331rcsq65es" path="res://Resources/Bullets/EmitterTestBullet.tres" id="95_f37sa"]
|
||||
[ext_resource type="Resource" uid="uid://dodwpect0ldjf" path="res://Resources/Items/Heart_Pickup.tres" id="95_srv0g"]
|
||||
[ext_resource type="PackedScene" uid="uid://nupd3pg74vua" path="res://Scenes/Activable/ScriptableInvisibleEmitter.tscn" id="96_ygp23"]
|
||||
[ext_resource type="Script" uid="uid://b5s5mjuk1rng5" path="res://Scripts/Resources/TimeModifier.cs" id="97_0bqta"]
|
||||
[ext_resource type="Script" uid="uid://c0ndqalsc4jve" path="res://Scripts/AttackPatterns/SpiralPattern.cs" id="98_gvbi8"]
|
||||
[ext_resource type="Script" uid="uid://bngko08ho85p6" path="res://Scripts/Resources/BulletScript.cs" id="99_j6vrf"]
|
||||
[ext_resource type="PackedScene" uid="uid://1yxieu8ekvkm" path="res://Scenes/Items/Heart_Extend_Pickup.tscn" id="99_xwjvv"]
|
||||
|
|
@ -255,7 +256,7 @@ DamageType = 0
|
|||
OverrideControllable = false
|
||||
Controllable = false
|
||||
OverrideCreationModifier = false
|
||||
TimeModifiers = []
|
||||
TimeModifiers = Array[ExtResource("97_0bqta")]([])
|
||||
WaitForCompletion = true
|
||||
metadata/_custom_type_script = "uid://c0ndqalsc4jve"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,17 @@ public partial class BossSpawner : ActorSpawner
|
|||
if (SpawnedActor is Boss boss)
|
||||
{
|
||||
boss.BossScript = BossScript;
|
||||
|
||||
boss.Activate();
|
||||
|
||||
CallDeferred(MethodName.ActivateBossDeferred);
|
||||
//boss.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
private void ActivateBossDeferred()
|
||||
{
|
||||
if (SpawnedActor is IActivable activable)
|
||||
{
|
||||
activable.Activate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,31 +16,34 @@ public partial class PatternGroup : AttackPattern
|
|||
return new PatternGroupMachine(this, parent);
|
||||
}
|
||||
|
||||
public class PatternGroupMachine(PatternGroup pattern, Node2D parent) : IPatternMachine
|
||||
public class PatternGroupMachine(PatternGroup patternGroup, Node2D parent) : IPatternMachine
|
||||
{
|
||||
public Node2D Parent => parent;
|
||||
private int currentPatternIndex = 0;
|
||||
private int _currentPatternIndex = 0;
|
||||
|
||||
private AttackPattern CurrentPattern => patternGroup.patterns[_currentPatternIndex];
|
||||
|
||||
IPatternMachine _patternMachine;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
currentPatternIndex = 0;
|
||||
_patternMachine = pattern.patterns[currentPatternIndex].MakeMachine(parent);
|
||||
_currentPatternIndex = 0;
|
||||
_patternMachine = CurrentPattern.MakeMachine(parent);
|
||||
_patternMachine.Start();
|
||||
}
|
||||
|
||||
public void UpdatePattern(double delta)
|
||||
{
|
||||
if (currentPatternIndex < pattern.patterns.Count)
|
||||
if (_currentPatternIndex < patternGroup.patterns.Count)
|
||||
{
|
||||
_patternMachine.UpdatePattern(delta);
|
||||
|
||||
if (!pattern.patterns[currentPatternIndex].WaitForCompletion || _patternMachine.IsComplete())
|
||||
if (!CurrentPattern.WaitForCompletion || _patternMachine.IsComplete())
|
||||
{
|
||||
currentPatternIndex++;
|
||||
if (currentPatternIndex < pattern.patterns.Count)
|
||||
_currentPatternIndex++;
|
||||
if (_currentPatternIndex < patternGroup.patterns.Count)
|
||||
{
|
||||
_patternMachine = CurrentPattern.MakeMachine(parent);
|
||||
_patternMachine.Start();
|
||||
}
|
||||
}
|
||||
|
|
@ -49,7 +52,7 @@ public partial class PatternGroup : AttackPattern
|
|||
|
||||
public bool IsComplete()
|
||||
{
|
||||
return currentPatternIndex >= pattern.patterns.Count;
|
||||
return _currentPatternIndex >= patternGroup.patterns.Count;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue