Space Soccer Improvements (#382)

* 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
This commit is contained in:
Rapandrasmus
2023-04-26 14:43:35 +02:00
committed by GitHub
parent 7858bdba3d
commit ac1804a901
63 changed files with 2930 additions and 6163 deletions

View File

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

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd6b3558bb367914eb7c7991d6c93205
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -6,6 +6,8 @@ namespace HeavenStudio.Common
{
#region Private
[SerializeField] private Material _shader;
[SerializeField]
private Renderer _renderer;
@ -32,7 +34,7 @@ namespace HeavenStudio.Common
private void Start()
{
_renderer.material = new Material(Shader.Find("Unlit/Transparent"));
_renderer.material = _shader;
var spriteRect = _sprite.rect;
var tex = CropTexture(_sprite.texture, new Rect(spriteRect.x, spriteRect.y, spriteRect.width, spriteRect .height));
@ -53,7 +55,7 @@ namespace HeavenStudio.Common
private Texture2D CropTexture(Texture2D original, Rect rect)
{
var colors = original.GetPixels((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);
var newTex = new Texture2D((int)rect.width - (int)rect.x, (int)rect.height - (int)rect.y);
var newTex = new Texture2D((int)rect.width, (int)rect.height);
newTex.SetPixels(colors);
newTex.Apply();