Every Unity.Mathematics using, alias and qualified name under Assets\Scripts and tools now names CultMath. The nine `using static ...noise;` lines are gone: snoise lives on CultMath's math. UnityExtensions loses float4.ToColor and Color.ToFloat4, which duplicate the bridge's ToColor and ToCultMath; the float3 colour pair stays because the bridge has none. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
23 lines
552 B
C#
23 lines
552 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using CultMath;
|
|
using static CultMath.math;
|
|
|
|
public class ShieldTest : MonoBehaviour
|
|
{
|
|
public float Acceleration;
|
|
private float _velocity;
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
_velocity += -sign(transform.position.x) * Acceleration * Time.deltaTime;
|
|
transform.position += Vector3.right * (_velocity * Time.deltaTime);
|
|
}
|
|
|
|
private void OnCollisionEnter(Collision other)
|
|
{
|
|
_velocity = -_velocity;
|
|
}
|
|
}
|