void OnClickWater(bool isClick) { if (isfirst && isClick) { btnWaterTweener = DotweenManager.BeginTouchActionUI(btnWater.gameObject); action = GameAction.Water; isfirst = false; o.SetActive(true); Vector3 pos = btnWater.transform.position; o.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(pos.x, pos.y - 33, 200)); } else { isfirst = true; action = GameAction.None; btnWaterTweener.PlayBackwards(); } }
void OnClickHarvest(bool isClick) { if (isfirst && isClick) { btnHarvestTweener = DotweenManager.BeginTouchActionUI(btnHarvest.gameObject); isfirst = false; o.SetActive(true); Vector3 pos = btnHarvest.transform.position; o.transform.position = Camera.main.ScreenToWorldPoint(new Vector3(pos.x, pos.y - 33, 200)); MTRunner.Instance.StartRunner(GetAll()); MusicManager.Instance.Playsfx(AudioNames.HarvestPlant); } else { isfirst = true; action = GameAction.None; btnHarvestTweener.PlayBackwards(); } }