Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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();
            }
        }