This commit is contained in:
CortexCore
2023-10-04 16:50:27 +08:00
parent 947e52e748
commit 5cd094ed9a
263 changed files with 144068 additions and 66 deletions

View File

@@ -0,0 +1,27 @@
using UnityEngine;
using Lightbug.CharacterControllerPro.Core;
namespace Lightbug.CharacterControllerPro.Demo
{
public class VerticalDirectionModifier2D : VerticalDirectionModifier
{
void OnTriggerEnter2D(Collider2D other)
{
if (!isReady)
return;
CharacterActor characterActor = GetCharacter(other.transform);
if (characterActor != null)
{
HandleUpDirection(characterActor);
characterActor.Up = reference.referenceTransform.up;
}
}
}
}