27 lines
563 B
C#
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);
|
|
}
|
|
}
|
|
}
|