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

@@ -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: