移除ECM2

This commit is contained in:
2025-05-11 21:42:51 +08:00
parent aadd564c38
commit a7bf033ca9
726 changed files with 0 additions and 138648 deletions

View File

@@ -1,47 +0,0 @@
using ECM2.Examples.FirstPerson;
using UnityEngine;
namespace ECM2.Examples.FirstPersonFly
{
/// <summary>
/// Regular First Person Character Input. Shows how to handle movement while flying.
/// In this case, we allow to fly towards our view direction, allowing to freely move through the air.
/// </summary>
public class FirstPersonFlyInput : FirstPersonInput
{
protected override void HandleInput()
{
// Call base method implementation
base.HandleInput();
if (character.IsFlying())
{
// Movement when Flying
Vector2 movementInput = GetMovementInput();
Vector3 movementDirection = Vector3.zero;
// Strafe
movementDirection += character.GetRightVector() * movementInput.x;
// Forward, along camera view direction (if any) or along character's forward if camera not found
Vector3 forward = character.camera
? character.cameraTransform.forward
: character.GetForwardVector();
movementDirection += forward * movementInput.y;
// Vertical movement
if (character.jumpInputPressed)
movementDirection += Vector3.up;
character.SetMovementDirection(movementDirection);
}
}
}
}