Initial commit
This commit is contained in:
27
Assets/Low Poly Animated People/- Scripts/AnimSpeed.cs
Normal file
27
Assets/Low Poly Animated People/- Scripts/AnimSpeed.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace PolyPerfect
|
||||
{
|
||||
public class AnimSpeed : MonoBehaviour
|
||||
{
|
||||
|
||||
Animator anim;
|
||||
|
||||
float Speed;
|
||||
|
||||
// Use this for initialization
|
||||
void Start()
|
||||
{
|
||||
Speed = Random.Range(0.85f, 1.25f);
|
||||
anim = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
anim.speed = Speed;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user