22 lines
724 B
C#
22 lines
724 B
C#
using UnityEngine;
|
|
|
|
namespace BetterStuff;
|
|
public class Behaviour : MonoBehaviour
|
|
{
|
|
private float timer = 2f;
|
|
private void Update()
|
|
{
|
|
timer += Time.deltaTime;
|
|
if(timer >= 2f)
|
|
{
|
|
timer = 0f;
|
|
foreach (SecurityGuardAnimationController controller in Resources.FindObjectsOfTypeAll<SecurityGuardAnimationController>())
|
|
{
|
|
controller.m_Agent.speed = Plugin.securityGuardSpeed.Value;
|
|
controller.m_Agent.acceleration *= Plugin.acceleration;
|
|
controller.m_Agent.angularSpeed *= Plugin.angularSpeed;
|
|
controller.m_AnimationWalkingSpeed = Plugin.securityGuardSpeed.Value;
|
|
}
|
|
}
|
|
}
|
|
} |