Hold Tilt

This commit is contained in:
SoulliesOfficial
2025-06-01 07:41:55 -04:00
parent df7abdb320
commit 61e6ac3a32
13 changed files with 16677 additions and 16674 deletions

View File

@@ -30,6 +30,7 @@ namespace Ichni.RhythmGame
{
effectCollection.Add("Generate", new List<EffectBase>());
effectCollection.Add("GeneralJudge", new List<EffectBase>());
effectCollection.Add("StartHold", new List<EffectBase>());
effectCollection.Add("Holding", new List<EffectBase>()); //仅用于Hold
effectCollection.Add("Perfect", new List<EffectBase>());
effectCollection.Add("Good", new List<EffectBase>());
@@ -322,6 +323,15 @@ namespace Ichni.RhythmGame
}
/// <summary>
/// 如果效果被打断主要对于Holding Effect则触发这个方法
/// </summary>
public virtual void Disrupt()
{
}
/// <summary>
/// 转换为存档类
/// </summary>

View File

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

View File

@@ -0,0 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using Lean.Pool;
using UnityEngine;
using UnityEngine.Events;
namespace Ichni
{
public class PooledObject : MonoBehaviour, IPoolable
{
public UnityAction onSpawn;
public UnityAction onDespawn;
public void OnSpawn()
{
onSpawn?.Invoke();
}
public void OnDespawn()
{
onDespawn?.Invoke();
}
public void SetOnSpawn(UnityAction action, bool isOverride = false, bool isAdditive = false)
{
if (isOverride)
{
onSpawn = action;
}
else if (isAdditive)
{
onSpawn += action;
}
else
{
onSpawn ??= action;
}
}
public void SetOnDespawn(UnityAction action, bool isOverride = false, bool isAdditive = false)
{
if (isOverride)
{
onDespawn = action;
}
else if (isAdditive)
{
onDespawn += action;
}
else
{
onDespawn ??= action;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d6ba0e915cddec743a29f85a93f12594
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: