33 lines
812 B
C#
33 lines
812 B
C#
using Assets.Scenes.Ride.Scripts;
|
|
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)
|
|
{
|
|
var speed = 30;
|
|
|
|
animator.SetFloat("preSpeed", 30f);
|
|
animator.SetFloat("speed", 30f);
|
|
animator.SetFloat("grade", 4f);
|
|
animator.SetFloat("power", 350f);
|
|
animator.SetFloat("bearing", 0);
|
|
timer += 1f;
|
|
}
|
|
}
|
|
}
|