做不出来

This commit is contained in:
SoulliesOfficial
2026-06-30 01:48:58 -04:00
parent 9a9e48f8a5
commit ddd387ef35
132 changed files with 8945 additions and 2943 deletions

View File

@@ -1,15 +1,12 @@
using System.Collections.Generic;
using ChocDino.UIFX;
using Cielonos.MainGame.Buffs.Character;
using Cielonos.MainGame.Characters;
using Cielonos.MainGame.Effects.Feedback;
using Cielonos.MainGame.FunctionalAnimation;
using Cielonos.MainGame.UI;
using SLSUtilities.Feedback;
using SLSUtilities.General;
using SLSUtilities.FunctionalAnimation;
using SLSUtilities.WwiseAssistance;
using UnityEngine;
using UnityEngine.InputSystem;
namespace Cielonos.MainGame.Inventory.Collections
{
@@ -27,12 +24,19 @@ namespace Cielonos.MainGame.Inventory.Collections
functionSm?.Update(player.selfTimeSm.DeltaTime);
}
if (Keyboard.current.xKey.wasPressedThisFrame)
/*if (Keyboard.current.xKey.wasPressedThisFrame)
{
SetBlock();
player.reactionSc.blockSm.GetBlockSource("Polychrome_Block").PerfectBlock(null, player.CenterPosition + player.transform.forward);
RemoveBlock();
}
if (Keyboard.current.zKey.wasPressedThisFrame)
{
player.reactionSc.dodgeSm.ApplyDodge(DodgeSource.Default(player));
player.reactionSc.dodgeSm.GetCurrentDodgeSource()?.PerfectDodge(null);
player.reactionSc.dodgeSm.RemoveDodge("DefaultDodge");
}*/
}
public override void OnEquipped()
@@ -174,16 +178,6 @@ namespace Cielonos.MainGame.Inventory.Collections
}
}
private bool TryPlayParryAttack(Enemy parryTarget, List<Enemy> availableEnemies)
{
if (parryTarget != null && !availableEnemies.Contains(parryTarget))
{
float distance = Vector3.Distance(player.transform.position.Flatten(), parryTarget.transform.position.Flatten());
return PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", parryTarget);
}
return PlayTargetedAnimation("BlockParryAttack");
}
public override void OnSecondaryPress()
{
if (player.statusSm.HasStatus(StatusType.Stun))
@@ -236,7 +230,7 @@ namespace Cielonos.MainGame.Inventory.Collections
return;
}
if (player.inputSc.IsHoldingSpecialA)
if (player.inputSc.IsHoldingSpecialB)
{
if (functionSm["DisruptionAttack"].IsAvailable())
{
@@ -274,11 +268,51 @@ namespace Cielonos.MainGame.Inventory.Collections
if (functionSm["HeavyAttack"].IsAvailable())
{
Enemy target = CombatManager.EnemySm.GetBestEnemy(availableEnemies);
//Enemy target = CombatManager.EnemySm.GetBestEnemy(availableEnemies);
Enemy nt = CombatManager.EnemySm.GetBestEnemy(CombatManager.EnemySm.GetEnemiesInRadius(player.transform.position, 15));
string nextNodeName = comboSm.main.GetNextNodeName("R");
bool keepAdsorption = nextNodeName is "RC";
if (PlayTargetedAnimation("Attack" + nextNodeName, target, 1f, keepAdsorption))
bool shouldWarp = false;
Vector3 targetPos = Vector3.zero;
if (nt != null && nextNodeName == "RA" && HasExtender<PhotonWarper>())
{
nextNodeName = "RB";
float distance = Vector3.Distance(player.transform.position, nt.transform.position);
if (distance > 2f)
{
shouldWarp = true;
player.movementSc.SmartTurnToTarget(nt, 360, true);
targetPos = player.movementSc.GetSafePositionNearTarget(nt, 1.0f);
}
}
if (nt != null && (shouldWarp || nextNodeName is "RC"))
{
player.movementSc.SmartTurnToTarget(nt, 360, true);
}
if (PlayTargetedAnimation("Attack" + nextNodeName, nt, 1f, keepAdsorption))
{
if (shouldWarp)
{
var interval = fullBodyFuncAnimSm.currentData.Interval(IntervalType.Startup);
float warpDuration = fullBodyFuncAnimSm.GetIntervalScaledDuration(IntervalType.Startup);
fullBodyFuncAnimSm.currentRuntimeFuncAnim.AddAnimEvent(interval.StartTime, new SetFuncAnimSpeed()
{
applyMode = SetFuncAnimSpeed.SpeedApplyMode.Override,
getFromBehaviorTree = false,
targetSpeed = 1f
});
fullBodyFuncAnimSm.currentRuntimeFuncAnim.AddAnimEvent(interval.EndTime, new SetFuncAnimSpeed()
{
applyMode = SetFuncAnimSpeed.SpeedApplyMode.Override,
getFromBehaviorTree = false,
targetSpeed = 1f
});
player.movementSc.Teleport(targetPos, warpDuration);
}
float totalTime = fullBodyFuncAnimSm.GetIntervalScaledDuration(IntervalType.Startup) - 0.2f;
CombatManager.EnemySm.activeEnemiesList.ForEach(enemy =>
{
@@ -288,8 +322,28 @@ namespace Cielonos.MainGame.Inventory.Collections
functionSm["HeavyAttack"].Execute();
}
}
return;
bool TryPlayParryAttack(Enemy parryTarget, List<Enemy> enemies)
{
if (parryTarget != null && !enemies.Contains(parryTarget))
{
float distance = Vector3.Distance(player.transform.position.Flatten(), parryTarget.transform.position.Flatten());
return PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", parryTarget);
}
return PlayTargetedAnimation("BlockParryAttack");
}
}
public override void OnSpecialAPress()
{
if (functionSm["UltimateAttack"].IsAvailable())
{
PlayTargetedAnimation("UltimateAttack");
functionSm["UltimateAttack"].Execute();
}
}
public override void OnSpecialCPress()
{
comboSm.main.Reset();
@@ -314,11 +368,6 @@ namespace Cielonos.MainGame.Inventory.Collections
player.selfTimeSm.AddLocalTimer(0.04f, () => RemoveBlock());
}
public override void OnSpecialBPress()
{
PlayTargetedAnimation("UltimateAttack");
}
}
public partial class Polychrome
@@ -400,27 +449,4 @@ namespace Cielonos.MainGame.Inventory.Collections
}
}
}
// =================================================================
// 以下为已废弃的 ExtraUIContainer 相关代码 / Deprecated ExtraUIContainer Codes
// =================================================================
/*
public partial class Polychrome
{
private PolychromeExtraUIContainer ExtraUIContainer => extraUIContainer as PolychromeExtraUIContainer;
// OnEquipped:
// extraUIContainer = Instantiate(extraUIContainerPrefab, PlayerCanvas.MainWeaponUIArea.transform).GetComponent<MainWeaponExtraUIContainer>();
// extraUIContainer.mainWeapon = this;
// OnUnequipped:
// Destroy(extraUIContainer.gameObject);
// UpdateVisuals:
// if (ExtraUIContainer != null)
// {
// ExtraUIContainer.SetStars(level);
// }
}
*/
}