Скрипт перемещения машин

This commit is contained in:
LikhenkoVG
2024-12-17 21:46:56 +03:00
parent 8358a1dcd6
commit 937a6340ec
18 changed files with 2833 additions and 48 deletions

View File

@ -0,0 +1,26 @@
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);
}
}
}