39 lines
831 B
C#
39 lines
831 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class TimelineUIController : MonoBehaviour
|
|
{
|
|
public float scale;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if(Input.GetKeyDown(KeyCode.LeftArrow))
|
|
{
|
|
//左方向键减速
|
|
Time.timeScale -= 1;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.RightArrow))
|
|
{
|
|
//右方向键加速
|
|
Time.timeScale += 1;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.UpArrow))
|
|
{
|
|
//上方向键恢复
|
|
Time.timeScale = 1;
|
|
}
|
|
if (Input.GetKeyDown(KeyCode.DownArrow))
|
|
{
|
|
//下方向键暂停
|
|
Time.timeScale = 0;
|
|
}
|
|
}
|
|
}
|