From 87383d5b8c40ae2114c38f6c5aedc55c7219ceca Mon Sep 17 00:00:00 2001 From: sylvermyon Date: Fri, 10 Jul 2026 01:08:12 -0700 Subject: [PATCH] add scripts from post-scale attempt --- .../.idea/indexLayout.xml | 8 - Assets/Scenes/Gameplay.unity | 266 ++++++++++++------ .../Scripts/Abilities/CirnoFreezeDeflect.cs | 2 +- Assets/Scripts/Abilities/CirnoIceBall.cs | 64 +++++ Assets/Scripts/Abilities/CirnoIceBall.cs.meta | 2 + Assets/Scripts/Abilities/EnemyAbility.cs | 50 ++-- .../Scripts/Abilities/EnemyBulletPattern.cs | 17 -- Assets/Scripts/Abilities/OrinMoveAndSpawn.cs | 52 ++++ .../Abilities/OrinMoveAndSpawn.cs.meta | 2 + Assets/Scripts/Dialogue/DialogueManager.cs | 1 + Assets/Scripts/Entities/Enemy.cs | 5 +- Assets/Scripts/Projectiles/IceBall.cs | 11 + Assets/Scripts/Projectiles/IceBall.cs.meta | 2 + Assets/Scripts/SpinEffect.cs | 18 +- Assets/Scripts/WaveManager.cs | 1 + .../Sprites/Portraits/GRReisenPort.png.meta | 3 +- Assets/Sprites/Portraits/Th105Youmu.png.meta | 3 +- .../placeholders/reallybadswordslash.png.meta | 3 +- 18 files changed, 362 insertions(+), 148 deletions(-) delete mode 100644 .idea/.idea.ReisenYoumuOuting/.idea/indexLayout.xml create mode 100644 Assets/Scripts/Abilities/CirnoIceBall.cs create mode 100644 Assets/Scripts/Abilities/CirnoIceBall.cs.meta create mode 100644 Assets/Scripts/Abilities/OrinMoveAndSpawn.cs create mode 100644 Assets/Scripts/Abilities/OrinMoveAndSpawn.cs.meta create mode 100644 Assets/Scripts/Projectiles/IceBall.cs create mode 100644 Assets/Scripts/Projectiles/IceBall.cs.meta diff --git a/.idea/.idea.ReisenYoumuOuting/.idea/indexLayout.xml b/.idea/.idea.ReisenYoumuOuting/.idea/indexLayout.xml deleted file mode 100644 index 7b08163..0000000 --- a/.idea/.idea.ReisenYoumuOuting/.idea/indexLayout.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Assets/Scenes/Gameplay.unity b/Assets/Scenes/Gameplay.unity index 3af5865..850c1df 100644 --- a/Assets/Scenes/Gameplay.unity +++ b/Assets/Scenes/Gameplay.unity @@ -1004,6 +1004,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 260785838} m_CullTransparentMesh: 1 +--- !u!1 &281948449 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 281948450} + - component: {fileID: 281948452} + - component: {fileID: 281948451} + m_Layer: 5 + m_Name: BG + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &281948450 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 281948449} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 809625460} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &281948451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 281948449} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: -7443756053782179069, guid: d0da55660b73232fcb2171dc7b78c64f, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &281948452 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 281948449} + m_CullTransparentMesh: 1 --- !u!1 &300987186 GameObject: m_ObjectHideFlags: 0 @@ -4261,6 +4336,108 @@ MonoBehaviour: livesText: {fileID: 594537357} hurtSound: {fileID: 8300000, guid: 31ceec34062edf012b9c9b29e9e3c583, type: 3} hurtVolume: 1 +--- !u!1 &809625456 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 809625460} + - component: {fileID: 809625459} + - component: {fileID: 809625458} + - component: {fileID: 809625457} + m_Layer: 5 + m_Name: BGCANVAS + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &809625457 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 809625456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 1 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &809625458 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 809625456} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + m_ReferencePixelsPerUnit: 100 + m_ScaleFactor: 1 + m_ReferenceResolution: {x: 1920, y: 1080} + m_ScreenMatchMode: 0 + m_MatchWidthOrHeight: 0 + m_PhysicalUnit: 3 + m_FallbackScreenDPI: 96 + m_DefaultSpriteDPI: 96 + m_DynamicPixelsPerUnit: 1 + m_PresetInfoIsWorld: 0 +--- !u!223 &809625459 +Canvas: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 809625456} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 1 + m_Camera: {fileID: 519420031} + m_PlaneDistance: 100 + m_PixelPerfect: 0 + m_ReceivesEvents: 1 + m_OverrideSorting: 0 + m_OverridePixelPerfect: 0 + m_SortingBucketNormalizedSize: 0 + m_VertexColorAlwaysGammaSpace: 0 + m_AdditionalShaderChannelsFlag: 0 + m_UpdateRectTransformForStandalone: 0 + m_SortingLayerID: 0 + m_SortingOrder: -10 + m_TargetDisplay: 0 +--- !u!224 &809625460 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 809625456} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0, y: 0, z: 0} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 281948450} + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0, y: 0} --- !u!1 &870930953 GameObject: m_ObjectHideFlags: 0 @@ -8929,93 +9106,6 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &2067192759 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2067192761} - - component: {fileID: 2067192760} - m_Layer: 0 - m_Name: BG - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!212 &2067192760 -SpriteRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2067192759} - m_Enabled: 1 - m_CastShadows: 0 - m_ReceiveShadows: 0 - m_DynamicOccludee: 1 - m_StaticShadowCaster: 0 - m_MotionVectors: 1 - m_LightProbeUsage: 1 - m_ReflectionProbeUsage: 1 - m_RayTracingMode: 0 - m_RayTraceProcedural: 0 - m_RayTracingAccelStructBuildFlagsOverride: 0 - m_RayTracingAccelStructBuildFlags: 1 - m_SmallMeshCulling: 1 - m_RenderingLayerMask: 1 - m_RendererPriority: 0 - m_Materials: - - {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2} - m_StaticBatchInfo: - firstSubMesh: 0 - subMeshCount: 0 - m_StaticBatchRoot: {fileID: 0} - m_ProbeAnchor: {fileID: 0} - m_LightProbeVolumeOverride: {fileID: 0} - m_ScaleInLightmap: 1 - m_ReceiveGI: 1 - m_PreserveUVs: 0 - m_IgnoreNormalsForChartDetection: 0 - m_ImportantGI: 0 - m_StitchLightmapSeams: 1 - m_SelectedEditorRenderState: 0 - m_MinimumChartSize: 4 - m_AutoUVMaxDistance: 0.5 - m_AutoUVMaxAngle: 89 - m_LightmapParameters: {fileID: 0} - m_SortingLayerID: 0 - m_SortingLayer: 0 - m_SortingOrder: -10 - m_Sprite: {fileID: -7443756053782179069, guid: d0da55660b73232fcb2171dc7b78c64f, type: 3} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_FlipX: 0 - m_FlipY: 0 - m_DrawMode: 0 - m_Size: {x: 19.2, y: 10.8} - m_AdaptiveModeThreshold: 0.5 - m_SpriteTileMode: 0 - m_WasSpriteAssigned: 1 - m_MaskInteraction: 0 - m_SpriteSortPoint: 0 ---- !u!4 &2067192761 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2067192759} - serializedVersion: 2 - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2118842021 GameObject: m_ObjectHideFlags: 0 @@ -9327,7 +9417,7 @@ SceneRoots: - {fileID: 703943384} - {fileID: 1824360583} - {fileID: 110796960} - - {fileID: 2067192761} - {fileID: 1586737003} - {fileID: 1848761516} - {fileID: 2145483546} + - {fileID: 809625460} diff --git a/Assets/Scripts/Abilities/CirnoFreezeDeflect.cs b/Assets/Scripts/Abilities/CirnoFreezeDeflect.cs index 4b84b4c..c78d992 100644 --- a/Assets/Scripts/Abilities/CirnoFreezeDeflect.cs +++ b/Assets/Scripts/Abilities/CirnoFreezeDeflect.cs @@ -70,7 +70,7 @@ public class CirnoFreezeDeflect : EnemyAbility } } } - private void DeflectProjectiles() + protected void DeflectProjectiles() { GameManager.instance.deflections += projectilesInRange.Count; foreach (Projectile projectile in projectilesAffected.ToArray()) diff --git a/Assets/Scripts/Abilities/CirnoIceBall.cs b/Assets/Scripts/Abilities/CirnoIceBall.cs new file mode 100644 index 0000000..7f59128 --- /dev/null +++ b/Assets/Scripts/Abilities/CirnoIceBall.cs @@ -0,0 +1,64 @@ +using Core.Extensions; +using UnityEngine; + +public class CirnoIceBall : EnemyAbility +{ + [Header("Ice Ball")] + [SerializeField] private IceBall iceBall; + + private IceBall iceballInstance; + [SerializeField] private float timeUntilShatter; + private float currentTimeOnSpawn; + [Header("Effects")] + [SerializeField] private float sweepDissipationTime; + private float currentDissipationTime; + [SerializeField] private GameObject swordSweepEffect; + protected override void AbilityEffects() + { + iceballInstance = ShootProjectile(iceBall, WaveManager.instance.GetRandomPlayerPoint(), iceBall.speed, false); + currentTimeOnSpawn = timeUntilShatter; + } + + protected override void Update() + { + base.Update(); + if (currentTimeOnSpawn > 0) + { + currentTimeOnSpawn -= Time.deltaTime; + if (currentTimeOnSpawn <= 0) + { + transform.Lookat2D(WaveManager.instance.GetRandomPlayerPoint()); + swordSweepEffect.SetActive(true); + currentDissipationTime = sweepDissipationTime; + iceballInstance.Shatter(); + } + } + + if (currentDissipationTime > 0) + { + currentDissipationTime -= Time.deltaTime; + if (currentDissipationTime <= 0) + { + swordSweepEffect.SetActive(false); + } + } + } + private IceBall ShootProjectile(IceBall projectile, Vector3 location, float speed, bool aimed) + { + IceBall newProjectile = Instantiate(projectile, origin.position, Quaternion.identity); + Vector3 projectileDirection = location; + if (aimed) + { + projectileDirection = WaveManager.instance.GetRandomPlayerPoint(); + } + newProjectile.transform.Lookat2D(projectileDirection); + newProjectile.damage = power; + newProjectile.tag = tag; + if (speed > 0f) + { + newProjectile.speed = speed; + } + + return newProjectile; + } +} \ No newline at end of file diff --git a/Assets/Scripts/Abilities/CirnoIceBall.cs.meta b/Assets/Scripts/Abilities/CirnoIceBall.cs.meta new file mode 100644 index 0000000..070454b --- /dev/null +++ b/Assets/Scripts/Abilities/CirnoIceBall.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: fff9dc9791c039bc6b167721faff21d5 \ No newline at end of file diff --git a/Assets/Scripts/Abilities/EnemyAbility.cs b/Assets/Scripts/Abilities/EnemyAbility.cs index 084eddd..043fa6f 100644 --- a/Assets/Scripts/Abilities/EnemyAbility.cs +++ b/Assets/Scripts/Abilities/EnemyAbility.cs @@ -1,21 +1,39 @@ +using Core.Extensions; using UnityEngine; public class EnemyAbility : Ability { - [SerializeField] private float cooldownDelta; - [SerializeField] private bool willLookAtPlayer; - protected virtual void Start() - { - cooldown += Random.Range(-cooldownDelta, cooldownDelta); - currentCooldown = Random.Range(0, cooldown); - } + [SerializeField] private float cooldownDelta; + [SerializeField] private bool willLookAtPlayer; + protected virtual void Start() + { + cooldown += Random.Range(-cooldownDelta, cooldownDelta); + currentCooldown = Random.Range(0, cooldown); + } - public override bool TryAbility() - { - if (willLookAtPlayer) - { - direction = WaveManager.instance.GetRandomPlayerPoint(); - } - return base.TryAbility(); - } -} + public override bool TryAbility() + { + if (willLookAtPlayer) + { + direction = WaveManager.instance.GetRandomPlayerPoint(); + transform.Lookat2D(direction); + } + return base.TryAbility(); + } + public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed) + { + Projectile newProjectile = Instantiate(projectile, origin.position, Quaternion.identity); + Vector3 projectileDirection = location; + if (aimed) + { + projectileDirection = WaveManager.instance.GetRandomPlayerPoint(); + } + newProjectile.transform.Lookat2D(projectileDirection); + newProjectile.damage = power; + newProjectile.tag = tag; + if (speed > 0f) + { + newProjectile.speed = speed; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Abilities/EnemyBulletPattern.cs b/Assets/Scripts/Abilities/EnemyBulletPattern.cs index f817ce2..519be00 100644 --- a/Assets/Scripts/Abilities/EnemyBulletPattern.cs +++ b/Assets/Scripts/Abilities/EnemyBulletPattern.cs @@ -46,23 +46,6 @@ public class EnemyBulletPattern : EnemyAbility } } } - - public void ShootProjectile(Projectile projectile, Vector3 location, float speed, bool aimed) - { - Projectile newProjectile = Instantiate(projectile, origin.position, Quaternion.identity); - Vector3 projectileDirection = location; - if (aimed) - { - projectileDirection = WaveManager.instance.GetRandomPlayerPoint(); - } - newProjectile.transform.Lookat2D(projectileDirection); - newProjectile.damage = power; - newProjectile.tag = tag; - if (speed > 0f) - { - newProjectile.speed = speed; - } - } private IEnumerator BurstFire(ProjectileDirection projectile, int burstCount, float burstDelay) { int currentCount = 0; diff --git a/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs b/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs new file mode 100644 index 0000000..492f1cb --- /dev/null +++ b/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs @@ -0,0 +1,52 @@ +using System.Collections; +using UnityEngine; + +public class OrinMoveAndSpawn : EnemyAbility +{ + [SerializeField] private Enemy ghostFairy; + [SerializeField] private int fairiesToSpawn; + private int currentFairiesLeft; + [SerializeField] private int variance; + [SerializeField] private Enemy thisEnemy; + [SerializeField] private float moveSpeed; + protected override void AbilityEffects() + { + base.AbilityEffects(); + currentFairiesLeft = fairiesToSpawn + Random.Range(-variance, variance); + thisEnemy.preventWobble = true; + thisEnemy.isStalled = true; + StartCoroutine(MoveToPosition(transform.position, WaveManager.instance.GetRandomEnemyPoint(), moveSpeed)); + } + + private IEnumerator MoveToPosition(Vector3 enemyOrigin, Vector3 moveDirection, float lerpSpeed) + { + float currentMovement = 0; + while (currentMovement < 1) + { + currentMovement += Time.deltaTime * lerpSpeed; + if (currentMovement >= 1) + { + SpawnGhostFairy(); + } + thisEnemy.transform.position = Vector3.Lerp(enemyOrigin, moveDirection, currentMovement); + yield return null; + } + } + + private void SpawnGhostFairy() + { + Enemy newEnemy = Instantiate(ghostFairy, WaveManager.instance.enemyFolder); + newEnemy.originalPosition = transform.position; + WaveManager.instance.enemiesInPlay.Add(newEnemy); + if (currentFairiesLeft > 0) + { + currentFairiesLeft--; + StartCoroutine(MoveToPosition(transform.position, WaveManager.instance.GetRandomEnemyPoint(), moveSpeed)); + } + else + { + thisEnemy.preventWobble = false; + thisEnemy.isStalled = false; + } + } +} \ No newline at end of file diff --git a/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs.meta b/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs.meta new file mode 100644 index 0000000..c702b3a --- /dev/null +++ b/Assets/Scripts/Abilities/OrinMoveAndSpawn.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 49a49f9644919e6ebb5aa8f30adbd9e4 \ No newline at end of file diff --git a/Assets/Scripts/Dialogue/DialogueManager.cs b/Assets/Scripts/Dialogue/DialogueManager.cs index a58b2ba..ea8d197 100644 --- a/Assets/Scripts/Dialogue/DialogueManager.cs +++ b/Assets/Scripts/Dialogue/DialogueManager.cs @@ -73,6 +73,7 @@ public class DialogueManager : MonoBehaviour dialogueActive = false; dialogueUI.SetActive(false); WaveManager.instance.player.isStalled = false; + WaveManager.instance.player.invulnerable = false; WaveManager.instance.bossInstance.isStalled = false; //GameManager.instance.SetPause(false); reisenAnimator.SetTrigger(switchToIdleTrigger); diff --git a/Assets/Scripts/Entities/Enemy.cs b/Assets/Scripts/Entities/Enemy.cs index 2ca4f60..8c734e4 100644 --- a/Assets/Scripts/Entities/Enemy.cs +++ b/Assets/Scripts/Entities/Enemy.cs @@ -8,7 +8,6 @@ public class Enemy : Entity { private Ability abilitySelected; public SpriteRenderer sprite; - private float currentState = 1; public float colorChangeSpeed; [Header("Movement")] public float moveSpeed; @@ -66,9 +65,8 @@ public class Enemy : Entity abilitySelected = freeAbilities[Random.Range(0, freeAbilities.Count)]; } bool success = abilitySelected.TryAbility(); - if (!success && abilitySelected.currentCooldown <= 0.5f && currentState >= 1f) + if (!success && abilitySelected.currentCooldown <= 0.5f) { - currentState = 0f; StartCoroutine(ImminentAttackAnim()); } else @@ -108,6 +106,7 @@ public class Enemy : Entity private IEnumerator ImminentAttackAnim() { + float currentState = 0; while (currentState < 1) { currentState += Time.deltaTime * colorChangeSpeed; diff --git a/Assets/Scripts/Projectiles/IceBall.cs b/Assets/Scripts/Projectiles/IceBall.cs new file mode 100644 index 0000000..8447e3d --- /dev/null +++ b/Assets/Scripts/Projectiles/IceBall.cs @@ -0,0 +1,11 @@ +using UnityEngine; + +public class IceBall : Projectile +{ + [SerializeField] private EnemyBulletPattern pattern; + public void Shatter() + { + pattern.TryAbility(); + Destroy(gameObject); + } +} \ No newline at end of file diff --git a/Assets/Scripts/Projectiles/IceBall.cs.meta b/Assets/Scripts/Projectiles/IceBall.cs.meta new file mode 100644 index 0000000..8d7be94 --- /dev/null +++ b/Assets/Scripts/Projectiles/IceBall.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 79ca09c8408e601d7ba18c2cb6204375 \ No newline at end of file diff --git a/Assets/Scripts/SpinEffect.cs b/Assets/Scripts/SpinEffect.cs index 7f7612a..8d89167 100644 --- a/Assets/Scripts/SpinEffect.cs +++ b/Assets/Scripts/SpinEffect.cs @@ -2,15 +2,9 @@ using UnityEngine; public class SpinEffect : MonoBehaviour { - // Start is called once before the first execution of Update after the MonoBehaviour is created - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} + [SerializeField] private float rotationSpeed; + void Update() + { + transform.Rotate(Vector3.forward, rotationSpeed * Time.deltaTime); + } +} \ No newline at end of file diff --git a/Assets/Scripts/WaveManager.cs b/Assets/Scripts/WaveManager.cs index 0d9ea26..f05080a 100644 --- a/Assets/Scripts/WaveManager.cs +++ b/Assets/Scripts/WaveManager.cs @@ -126,6 +126,7 @@ public class WaveManager : MonoBehaviour bossDescriptionUI.text = waveList[wave - 1].bossDescription; UpdateBossUI(); player.isStalled = true; //wait for boss to enter then start dialogue + player.invulnerable = true; } public Enemy SpawnEnemy(Enemy enemy) diff --git a/Assets/Sprites/Portraits/GRReisenPort.png.meta b/Assets/Sprites/Portraits/GRReisenPort.png.meta index 4af1642..5537fd3 100644 --- a/Assets/Sprites/Portraits/GRReisenPort.png.meta +++ b/Assets/Sprites/Portraits/GRReisenPort.png.meta @@ -147,7 +147,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + GRReisenPort_0: 4468062175109948465 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Assets/Sprites/Portraits/Th105Youmu.png.meta b/Assets/Sprites/Portraits/Th105Youmu.png.meta index 1eddb46..4d3d629 100644 --- a/Assets/Sprites/Portraits/Th105Youmu.png.meta +++ b/Assets/Sprites/Portraits/Th105Youmu.png.meta @@ -147,7 +147,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + Th105Youmu_0: 8559990530630230403 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: diff --git a/Assets/Sprites/placeholders/reallybadswordslash.png.meta b/Assets/Sprites/placeholders/reallybadswordslash.png.meta index cd6aeef..4eacd96 100644 --- a/Assets/Sprites/placeholders/reallybadswordslash.png.meta +++ b/Assets/Sprites/placeholders/reallybadswordslash.png.meta @@ -147,7 +147,8 @@ TextureImporter: secondaryTextures: [] spriteCustomMetadata: entries: [] - nameFileIdTable: {} + nameFileIdTable: + reallybadswordslash_0: 227286115079703930 mipmapLimitGroupName: pSDRemoveMatte: 0 userData: