mirror of
https://github.com/Mukheem/TwinTurbine.git
synced 2025-02-23 11:51:30 +01:00
24 lines
529 B
C#
24 lines
529 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Windturbine : MonoBehaviour
|
|
{
|
|
public float angle;
|
|
public float speed;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
angle = Random.Range(0.0f, 120.0f);
|
|
speed = Random.Range(75.0f, 86.0f);
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
transform.localEulerAngles = new Vector3(0.0f, 0.0f, angle);
|
|
angle += Time.deltaTime * speed;
|
|
}
|
|
}
|