using DG.Tweening; using System.Collections; using System.Collections.Generic; using UnityEngine; public class ButtonFX : MonoBehaviour { // Start is called before the first frame update //126 219 255 128 public bool isUserEnterClick; public Vector3 moveToEndV3; private Renderer renderers; void Start() { renderers = this.GetComponent(); } // Update is called once per frame void Update() { } public string currentEnterStr; public string LastStr; private bool isOne; public void userEnterClick(bool isEnter,string buttonName) { currentEnterStr = buttonName; if(currentEnterStr== currentUserClikcStr) { return; } else { if(isEnter) { this.gameObject.transform.position = moveToEndV3; renderers.material.DOColor(new Color(126 / 255f, 219 / 255f, 255f, 128), "_TintColor", 0.2f); } else { renderers.material.DOColor(new Color(0, 0, 0, 128), "_TintColor", 0.2f); } } } private string currentUserClikcStr; public void userClickButtonStr(string str) { currentUserClikcStr = str; } }