Crossy_Road_VR/Assets/Crossy Road VR/Scripts/CarControllerScript.cs
2024-12-17 21:46:56 +03:00

27 lines
563 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Скрипт для анимации машины
/// </summary>
public class CarControllerScript : MonoBehaviour
{
/// <summary>
/// to do
/// </summary>
[SerializeField]
private List<GameObject> _Wheels = new List<GameObject>();
[SerializeField]
private int _Speed;
private void FixedUpdate()
{
foreach (var wheel in _Wheels)
{
wheel.transform.Rotate(Vector3.right * _Speed);
}
}
}