叉车轮盘和视频界面返回不了的bug
This commit is contained in:
parent
2dcce5ccc9
commit
9206192474
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,29 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class RotateAnimation : MonoBehaviour
|
||||
{
|
||||
public float rotationSpeed = 50f;
|
||||
private Vector3 rot;
|
||||
private void Start()
|
||||
{
|
||||
rot = transform.localEulerAngles;
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (Input.GetKey(KeyCode.A))
|
||||
{
|
||||
transform.Rotate(-Vector3.up * rotationSpeed * Time.deltaTime);
|
||||
}
|
||||
else if (Input.GetKey(KeyCode.D))
|
||||
{
|
||||
transform.Rotate(Vector3.up * rotationSpeed * Time.deltaTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.localEulerAngles = rot;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d8fcb30cae22e1844b32a3cfa6db635f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Loading…
Reference in New Issue