summaryrefslogtreecommitdiff
path: root/Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2022-03-10 14:07:40 +0800
committerchai <chaifix@163.com>2022-03-10 14:07:40 +0800
commit22891bf59032ba88262824255a706d652031384b (patch)
tree7595439ba9966c9402d37e37cee5e8cf098757d5 /Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs
parent8b04ea73e540067f83870b61d89db4868fea5e8a (diff)
* move folder
Diffstat (limited to 'Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs')
-rw-r--r--Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs44
1 files changed, 0 insertions, 44 deletions
diff --git a/Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs b/Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs
deleted file mode 100644
index 9138bd09..00000000
--- a/Assets/Art/Vfx/Hit & Slashes Vol.3/Demo Scene/ButtonAnimation.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-
-public class ButtonAnimation : MonoBehaviour {
- float initial_size_x;
- float initial_size_y;
- public float factor = 0.5f;
- public float speed = 1.15f;
- bool GO = false;
-
- void Awake () {
- initial_size_x = transform.localScale.x;
- initial_size_y = transform.localScale.y;
- }
-
- void FixedUpdate () {
- if(GO)
- {
- float aux_x = transform.localScale.x;
- float aux_y = transform.localScale.y;
- if(transform.localScale.y < initial_size_y)
- {
- aux_x *= speed;
- aux_y *= speed;
- transform.localScale = new Vector3 (aux_x, aux_y, 1.0f);
- }
- else
- {
- aux_x = initial_size_x;
- aux_y = initial_size_y;
- transform.localScale = new Vector3 (aux_x, aux_y, 1.0f);
- GO = false;
- }
-
- }
- }
-
- void Go()
- {
- GO = true;
- transform.localScale = new Vector3 (initial_size_x*factor, initial_size_y*factor, 1.0f);
- }
-}