sega 8a6d23b77d Реорг Scripts
Разделено на 4 модуля
- Menu
- Gameplay
- Settings
- Common
2026-07-15 10:49:55 +03:00

21 lines
472 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SinRotator : MonoBehaviour
{
public float speed;
float amplitude = 0.2f;
private void Start()
{
amplitude = transform.localScale.x;
}
void Update()
{
float x = 0.5f + 0.5f * Mathf.Sin(Time.time * speed);
x *= amplitude;
transform.localScale = new Vector3(x, transform.localScale.y, transform.localScale.z);
}
}