移除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,34 +0,0 @@
using UnityEngine;
namespace ECM2.Examples.SlopeSpeedModifier
{
/// <summary>
/// This example shows how to extend a Character (through inheritance) to modify its speed
/// based on current slope angle.
/// </summary>
public class MyCharacter : Character
{
/// <summary>
/// Returns the Character's current speed modified by slope angle.
/// </summary>
public override float GetMaxSpeed()
{
float maxSpeed = base.GetMaxSpeed();
float slopeAngle = GetSignedSlopeAngle();
float speedModifier = slopeAngle > 0.0f
? 1.0f - Mathf.InverseLerp(0.0f, 90.0f, +slopeAngle) // Decrease speed when moving up-slope
: 1.0f + Mathf.InverseLerp(0.0f, 90.0f, -slopeAngle); // Increase speed when moving down-slope
return maxSpeed * speedModifier;
}
private void OnGUI()
{
GUI.Label(new Rect(10, 10, 400, 20),
$"Slope angle: {GetSignedSlopeAngle():F2} maxSpeed: {GetMaxSpeed():F2} ");
}
}
}

View File

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