Shop weitergebaut, CreditsScene angepasst, MainMenue weiter verschönert, an Monetarisierung gearbeitet
This commit is contained in:
51
Assets/Scripts/Button Functions/TweenScript.cs
Normal file
51
Assets/Scripts/Button Functions/TweenScript.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TweenScript : MonoBehaviour
|
||||
{
|
||||
|
||||
[SerializeField] private float duration;
|
||||
[SerializeField] private GameObject button;
|
||||
|
||||
//private KeyCode secretCode = KeyCode.G;
|
||||
|
||||
Vector3 ort = new Vector3();
|
||||
|
||||
public void Start()
|
||||
{
|
||||
duration = 2;
|
||||
//button = this.GameObject;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
OnClick();
|
||||
}
|
||||
|
||||
public void Scale()
|
||||
{
|
||||
LeanTween.scale(button, transform.localScale * 1.1f, duration * Time.deltaTime).setEase(LeanTweenType.easeOutBounce);
|
||||
//LeanTween.scale(Trinagle, new Vector3(2,2,2), duration).setOnComplete(Debug.Log);
|
||||
}
|
||||
|
||||
private void Move()
|
||||
{
|
||||
LeanTween.moveX(button, button.transform.position.y, duration * Time.deltaTime);
|
||||
}
|
||||
|
||||
public void Bounce()
|
||||
{
|
||||
//code folgt
|
||||
//code steht in scale
|
||||
//mach circle bounce on space press
|
||||
}
|
||||
|
||||
public void OnClick()
|
||||
{
|
||||
if (Input.GetKeyDown(KeyCode.Mouse1))
|
||||
{
|
||||
Scale();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user