squash commits

This commit is contained in:
2025-01-07 18:54:46 +02:00
parent 855639487b
commit 62c0a21987
3632 changed files with 708443 additions and 999 deletions
@@ -0,0 +1,51 @@
using UnityEngine;
namespace UMA.Examples
{
public class Locomotion : MonoBehaviour
{
protected Animator animator;
public float DirectionDampTime = .25f;
void Start()
{
animator = GetComponent<Animator>();
if (animator == null)
{
return;
}
if (animator.layerCount >= 2)
{
animator.SetLayerWeight(1, 1);
}
}
void Update()
{
if (animator)
{
float h = Input.GetAxis("Horizontal");
float v = Input.GetAxis("Vertical");
animator.SetFloat("Speed", h * h + v * v);
animator.SetFloat("Direction", h, DirectionDampTime, Time.deltaTime);
}
else
{
animator = GetComponent<Animator>();
}
}
void OnCollisionEnter(Collision collision)
{
if (Debug.isDebugBuild)
{
Debug.Log(collision.collider.name + ":" + name);
}
}
}
}