PBG2H23ABR_PBG2H23AKL_PMC_P.../Plunderblock/Assets/Scripts/ScriptsKevin/Spin.cs

27 lines
464 B
C#
Raw Normal View History

2024-06-14 19:08:04 +02:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Spin : MonoBehaviour
{
private float time = 0;
public float speed;
public void spinY(float add){
transform.rotation = Quaternion.Euler(0f,220f + add,0f);
}
void Start()
{
}
// Update is called once per frame
void Update()
{
time += Time.deltaTime + speed * Time.deltaTime;
spinY(time);
}
}