场景设计

This commit is contained in:
SoulliesOfficial
2026-01-12 03:22:16 -05:00
parent 33b1795c1f
commit d94241f36c
8645 changed files with 1242757 additions and 1039728 deletions

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0011458809295494b9efebdcb4697aec
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
using Cielonos.MainGame.Characters;
using SLSUtilities.FunctionalAnimation;
using UnityEngine;
namespace Cielonos.MainGame.Buffs
{
public class Freeze : CharacterBuffBase
{
public Freeze(float duration)
{
Initialize(BuffType.Negative, BuffDispelLevel.Strong);
this.contentSubmodule = new ContentSubmodule(this);
this.statusSubmodule = new StatusSubmodule(this, StatusType.Incapacitation);
this.independentStackSubmodule = new IndependentStackSubmodule(this, 1, duration);
}
public override bool OnBuffApply(out CharacterBuffBase existingBuff)
{
if (FindExistingSameBuff(out existingBuff))
{
existingBuff.independentStackSubmodule.Merge(this.independentStackSubmodule);
return false;
}
return true;
}
public override void OnAfterFirstApply()
{
base.OnAfterFirstApply();
attachedCharacter.selfTimeSm.localTimeScale.Value = 0;
}
public override void OnBuffUpdate()
{
independentStackSubmodule?.Update(Time.deltaTime);
}
public override void OnBuffRemove()
{
statusSubmodule.RemoveStatus();
attachedCharacter.selfTimeSm.localTimeScale.Value = 1;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 1edd7bd123f9f814eaae351ec8aa3e47

View File

@@ -1,4 +1,5 @@
using System;
using Sirenix.OdinInspector;
using SLSUtilities.FunctionalAnimation;
using UnityEngine;
@@ -9,9 +10,44 @@ namespace Cielonos.MainGame.FunctionalAnimation
{
public string animationName;
[Tooltip("是否启用高级设置")]
public bool advancedSettings;
[ShowIf("advancedSettings")]
[Tooltip("用于Update Event是否在落地时切换动画")]
public bool switchWhenLanding;
[ShowIf("advancedSettings")]
[Tooltip("如果switchWhenLanding为true是否覆盖地面检测的长度")]
public bool overrideGroundDetection;
[ShowIf("advancedSettings"), ShowIf("overrideGroundDetection")]
[Tooltip("覆盖地面检测的长度")]
public float overrideGroundDetectionLength = 0.1f;
public override void Invoke()
{
runtimeFuncAnim.executor.animationSc.fullBodyFuncAnimSm.Play(animationName);
if (!advancedSettings)
{
runtimeFuncAnim.executor.animationSc.fullBodyFuncAnimSm.Play(animationName);
}
else
{
if (switchWhenLanding)
{
if (overrideGroundDetection)
{
if (character.movementSc.groundDetector.DetectGround())
{
runtimeFuncAnim.executor.animationSc.fullBodyFuncAnimSm.Play(animationName);
}
}
else
{
if (character.movementSc.groundDetector.DetectGround(overrideGroundDetectionLength))
{
runtimeFuncAnim.executor.animationSc.fullBodyFuncAnimSm.Play(animationName);
}
}
}
}
}
}
}

View File

@@ -18,8 +18,8 @@ namespace Cielonos.MainGame.Characters
}
private Vector3 lastDirection;
public override void OnAnimatorMove()
protected override void OnAnimatorMove()
{
if (Time.deltaTime == 0 || owner.statusSm.isDead)
{

View File

@@ -77,12 +77,15 @@ namespace Cielonos.MainGame.Characters
return;
}
RuntimeFuncAnim currentFuncAnim = fullBodyFuncAnimSm.currentRuntimeFuncAnim;
lastFrameIntervals = currentIntervals;
currentIntervals = fullBodyFuncAnimSm.currentRuntimeFuncAnim.GetEnablingIntervals();
currentIntervals = currentFuncAnim.GetEnablingIntervals();
disruptionStatus[DisruptionType.NormalExternal] = currentIntervals.Any(interval => interval.intervalType == IntervalType.ExternalDisruption);
disruptionStatus[DisruptionType.NormalAction] = currentIntervals.Any(interval => interval.intervalType == IntervalType.ActionDisruption);
disruptionStatus[DisruptionType.Movement] = currentIntervals.Any(interval => interval.intervalType == IntervalType.MovementDisruption);
if (fullBodyFuncAnimSm.currentRuntimeFuncAnim.HasIntervalType(IntervalType.ForcedActionDisruption))
if (currentFuncAnim.HasIntervalType(IntervalType.ForcedActionDisruption))
{
disruptionStatus[DisruptionType.ForcedAction] = currentIntervals.Any(interval => interval.intervalType == IntervalType.ForcedActionDisruption);
}
@@ -90,7 +93,8 @@ namespace Cielonos.MainGame.Characters
{
disruptionStatus[DisruptionType.ForcedAction] = true;
}
if (fullBodyFuncAnimSm.currentRuntimeFuncAnim.HasIntervalType(IntervalType.ForcedExternalDisruption))
if (currentFuncAnim.HasIntervalType(IntervalType.ForcedExternalDisruption))
{
disruptionStatus[DisruptionType.ForcedExternal] = currentIntervals.Any(interval => interval.intervalType == IntervalType.ForcedExternalDisruption);
}
@@ -98,7 +102,9 @@ namespace Cielonos.MainGame.Characters
{
disruptionStatus[DisruptionType.ForcedExternal] = true;
}
isDuringRootMotion = currentIntervals.Any(interval => interval.intervalType == IntervalType.RootMotion);
isDuringRootMotion = currentFuncAnim.funcAnimData.animInfo.useRootMotion &&
currentIntervals.Any(interval => interval.intervalType == IntervalType.RootMotion);
}
}

View File

@@ -1,5 +1,6 @@
using System;
using DG.Tweening;
using SLSFramework.General;
using UnityEngine;
using UnityEngine.AI;
@@ -9,8 +10,8 @@ namespace Cielonos.MainGame.Characters
{
protected AnimationSubcontrollerBase animationSc => owner.animationSc;
protected Animator animator => animationSc.animator;
public virtual void OnAnimatorMove()
protected virtual void OnAnimatorMove()
{
if (owner.animationSc.isDuringRootMotion)
{
@@ -44,6 +45,7 @@ namespace Cielonos.MainGame.Characters
characterTransform.rotation *= originalDeltaRotation;
Vector3 originalDeltaPosition = animator.deltaPosition;
Vector3 localDeltaPosition = characterTransform.InverseTransformDirection(originalDeltaPosition);
Vector3 adjustedLocalDeltaPosition = new Vector3(localDeltaPosition.x * rootMotionMoveXMultiplier, localDeltaPosition.y,
localDeltaPosition.z * rootMotionMoveZMultiplier);

View File

@@ -9,7 +9,7 @@ namespace Cielonos.MainGame.Characters
{
public Player player => owner as Player;
public override void OnAnimatorMove()
protected override void OnAnimatorMove()
{
if (DeltaTime == 0)
{

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2e8bf417f067ae64bbaed294538e17b0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System;
using Sirenix.OdinInspector;
using SLSFramework.General;
using UnityEngine;
namespace Cielonos.MainGame.Environments
{
public class EnvironmentManager : Singleton<EnvironmentManager>
{
[Required]
public RainingSubmodule rainingSm;
private void Start()
{
rainingSm.rainingState.SetValue();
rainingSm.rainingStart.Post(gameObject);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: a66778e3fc7c7e443b11cc3e6a8078bb

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fd9e0960533e30345b77bc299fbc5d3f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,19 @@
using System;
using AK.Wwise;
using UnityEngine;
using Event = AK.Wwise.Event;
namespace Cielonos.MainGame.Environments
{
public class RainingSubmodule : SubmoduleBase<EnvironmentManager>
{
public State rainingState;
public Event rainingStart;
public Event rainingStop;
public RainingSubmodule(EnvironmentManager owner) : base(owner)
{
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 74f936895efd13c479619070a3002681

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c163f613e33e3104b989825d8ccd5770
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,11 +1,12 @@
using System;
using System.Collections.Generic;
using Sirenix.OdinInspector;
using SLSFramework.AllInOneAssistance;
using UnityEngine;
namespace Cielonos.MainGame.Inventory
{
public partial class ItemViewObject : SerializedMonoBehaviour
public partial class ItemViewObject : General3DObject
{
public Dictionary<string, GameObject> functionalParts;
@@ -44,8 +45,10 @@ namespace Cielonos.MainGame.Inventory
return false;
}
private void Reset()
protected override void Reset()
{
base.Reset();
functionalParts ??= new Dictionary<string, GameObject>();
FindAndAssignPart("GrabPoint");

View File

@@ -15,6 +15,7 @@ namespace Cielonos.MainGame.Inventory.Collections
RegisterFunctionsToAnimSc(SwingForward, SwingDown, LightAttack0, LightAttack1_0, LightAttack1_1,
LightAttack2, LightAttack3, HeavyAttack, ReleaseAura);
PlayTargetedAnimation("Equip");
viewObjects["Wand"].SetFadeAnim(0.5f);
PlayerCanvas.Instance.mainWeaponUIArea.displayer.SetFrameOutline(1);
}
@@ -99,7 +100,7 @@ namespace Cielonos.MainGame.Inventory.Collections
.SetAttackSubmodule<Projectile>(attackData[vfxName])
.SetTimeSubmodule<Projectile>(10f)
.SetHitSubmodule<Projectile>()
.SetAdaptiveTraceMoveModule<Projectile>(currentTarget, speed, 5f, 20f, 20f, direction)
.SetAdaptiveTraceMoveModule<Projectile>(target, speed, 5f, 20f, 20f, direction)
.SetRaycastSubmodule<Projectile>(default, 0.25f, 0.5f)
.SetForceSubmodule<Projectile>(5f);

View File

@@ -29,6 +29,9 @@ namespace Cielonos.MainGame.Inventory.Collections
TripleAttack_0, TripleAttack_1, TripleAttack_2,
DisruptAttack, HeavyAttack, RunAttack, ParryAttack, StayBlocking);
viewObjects["Katana"].SetFadeAnim(0.2f);
viewObjects["Saya"].SetFadeAnim(0.2f);
PlayerCanvas.Instance.mainWeaponUIArea.displayer.SetFrameOutline(0.4f);
PlayTargetedAnimation("EquipBlock");
@@ -75,6 +78,13 @@ namespace Cielonos.MainGame.Inventory.Collections
public override void OnSecondaryPress()
{
if (player.landMovementSc.isJumping && functionSm["HeavyAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability())
{
comboSm.ResetCombo();
functionSm["HeavyAttack"].Execute();
PlayTargetedAnimation("AirAttackStart0");
}
if (perfectBlockedTimer > 0f && functionSm["HeavyAttack"].IsAvailable() && fullBodyFuncAnimSm.CheckPlayability(DisruptionType.ForcedAction))
{
perfectBlockedTimer = 0f;

View File

@@ -0,0 +1,65 @@
using Cielonos.MainGame.Characters;
using Cielonos.UI;
using UnityEngine;
namespace Cielonos.MainGame
{
namespace Inventory.Collections
{
public partial class IceCone : SupportEquipmentBase
{
private Transform muzzle;
public override void OnObtained()
{
base.OnObtained();
muzzle = player.bodyPartsSc.AuxiliaryDrone.center;
}
public override void OnPress()
{
if (functionSm["Shoot"].IsAvailable())
{
//audioContainer.PlaySoundFX("Shoot", muzzle.gameObject);
CharacterBase enemy = BattleManager.EnemySm.GetNearestEnemy(50f);
GenerateProjectile("Projectile", enemy, 20f, muzzle);
functionSm["Shoot"].Execute();
PlayerCanvas.Instance.supportEquipmentsUIArea[this].UseOutlineAnimation();
}
else
{
PlayerCanvas.Instance.supportEquipmentsUIArea[this].CanNotUseOutlineAnimation();
}
}
}
public partial class IceCone
{
private void GenerateProjectile(string vfxName, CharacterBase target, float speed, Transform muzzle = null)
{
muzzle ??= this.muzzle;
vfxData.SpawnMuzzleVFX(vfxName, muzzle);
Projectile projectile = vfxData.SpawnVFX(vfxName, muzzle).GetComponentInChildren<Projectile>();
Vector3 direction = player.transform.forward;
if (target != null)
{
direction = (target.flexibleCenterPoint.position - projectile.transform.position).normalized;
}
projectile.Initialize(player, this, false, 1, Fraction.Enemy)
.SetAttackSubmodule<Projectile>(attackData[vfxName])
.SetTimeSubmodule<Projectile>(10f)
.SetHitSubmodule<Projectile>()
.SetAdaptiveTraceMoveModule<Projectile>(target, speed, 5f, 20f, 20f, direction)
.SetRaycastSubmodule<Projectile>(default, 0.25f, 0.5f)
.SetForceSubmodule<Projectile>(5f);
//audioContainer.PlaySoundFX(vfxName + "Release", projectile.gameObject, true);
/*projectile.hitSm.AddHitSound(vfxName.Replace("Projectile", "") + "Hit")
.AddHitEvent((enemy, hitPosition) => feedbackSc["Hit"].Play());*/
}
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f969b701af8936748980012d7769e9b1

View File

@@ -19,7 +19,7 @@ namespace Cielonos.MainGame
private void Start()
{
Application.targetFrameRate = 60;
Application.targetFrameRate = 90;
}
private void Update()