30 lines
749 B
C#
30 lines
749 B
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
public class TestVideoPlayer : MonoBehaviour
|
|||
|
|
{
|
|||
|
|
Animator animator { get; set; }
|
|||
|
|
// Start is called before the first frame update
|
|||
|
|
void Start()
|
|||
|
|
{
|
|||
|
|
animator = GetComponent<Animator>();
|
|||
|
|
animator.Play("idle");
|
|||
|
|
}
|
|||
|
|
float timer = 1f;
|
|||
|
|
// Update is called once per frame
|
|||
|
|
void Update()
|
|||
|
|
{
|
|||
|
|
timer -= Time.deltaTime;
|
|||
|
|
while (timer < 0)
|
|||
|
|
{
|
|||
|
|
animator.SetFloat("preSpeed", 30f);
|
|||
|
|
animator.SetFloat("speed", 30f);
|
|||
|
|
animator.SetFloat("grade", 4f);
|
|||
|
|
animator.SetFloat("power", 350f);
|
|||
|
|
animator.SetFloat("bearing", 0);
|
|||
|
|
timer += 1f;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|