mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 22:25:07 +00:00
ac1804a901
* SupahScrollSetUp
* Scrolls now, with issues, also added a flames animation
* Started implementing new multiple space kickers
* bg recolor space soccer
* Recolorable dots!
* we circular motitating n shit
* ReAdded Enter and exit stuff
* I despise unexplainable bugs
* The balls are so buggy 😱
* Trying to fix someting
* Fixed Scroll Stutter
* Fixed a whiff bug
* Updated sounds and added ease event for space kickers
* Fixed some bugs
* Changed some names
* new option for quiz show random presses
* Board meeting bug fixes
* Testing Curve stuff
* Converted all code to use new curves, need to fix all issues
* Playing around with keypoint values, will probably expose them so someone else can mess with them
* curves be like
* Fixed stuff
* BALLS FIXED
* Fixed clappy trio stuff
* Added player move event
* Almost fixed, just need to fix wonkiness with high kick toe
* Fixed da bug
* Board meeting and quiz show tweaks
* Fix for board meeting and enter/exit presets for space soccer
* Stop ball added
* Updated how scroll works
32 lines
837 B
C#
32 lines
837 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace HeavenStudio.Common
|
|
{
|
|
public class CircularMotion : MonoBehaviour
|
|
{
|
|
public float timeOffset = 0;
|
|
public float timeCounter = 0;
|
|
[SerializeField] Transform rootPos;
|
|
public float speed;
|
|
public float width;
|
|
public float height;
|
|
|
|
private void Start()
|
|
{
|
|
timeCounter = 0;
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
timeCounter += Time.deltaTime * speed;
|
|
float x = Mathf.Cos(timeCounter + timeOffset) * width + rootPos.position.x;
|
|
float y = Mathf.Sin(timeCounter + timeOffset) * height + rootPos.position.y;
|
|
float z = transform.position.z;
|
|
|
|
transform.position = new Vector3(x, y, z);
|
|
}
|
|
}
|
|
|
|
}
|