Exemplo n.º 1
0
        public void Big()
        {
            if (_status == SHOW_STATUS.BIG)
            {
                return;
            }
            _status = SHOW_STATUS.BIG;

            // gameObject.SetActive(true);

            float xMove = 0;

            if (transform.parent != null)
            {
                xMove = -transform.parent.localPosition.x;
            }

            showBig(0.2f);

            UpdatePetPosition();

            if (running_tween != null)
            {
                running_tween.Kill();
            }

            Sequence tween = DOTween.Sequence();

            tween.Join(transform.DOLocalMove(new Vector3(xMove, 0.1f, 0), _act_duration));
            // tween.Join(ui.transform.DOLocalMoveX(-1, _act_duration));
            // tween.Join(ui.transform.DOScale(Vector3.one * 0.005f, _act_duration));
            // tween.Join(petBar.DOAnchorPos(new Vector2(100, -250), _act_duration));
            // tween.Join(character.transform.DOLocalMoveX(-1.8f, _act_duration));

            GetComponent <Animator>().SetBool("Big", true);

            /*
             * for (int i = 0; i < hideInBig.Length; i++) {
             *  hideInBig[i].SetActive(false);
             * }
             */

            running_tween = tween;

            tween.OnComplete(() => {
                showBig(1.0f);
                SetEffectActive(1, true);
                running_tween = null;
            });
            tween.Play();
        }
Exemplo n.º 2
0
        // private bool show_small_on_late_update = false;
        public void Normal(int offset)
        {
            if (offset == 0)
            {
                gameObject.SetActive(true);
            }

            const float grid_width = 0.765f;
            Sequence    tween      = DOTween.Sequence();

            if (_status == SHOW_STATUS.NORMAL)
            {
                tween.Join(transform.DOLocalMove(new Vector3(0 + offset * grid_width, 0, 0), _act_duration));
            }
            else
            {
                _status = SHOW_STATUS.NORMAL;
                // Vector3 targetScale = new Vector3(0.2f, 1, 1);
                tween.Join(transform.DOLocalMove(new Vector3(0 + offset * grid_width, 0, 0), _act_duration));
                // tween.Join(ui.transform.DOLocalMoveX(0, _act_duration));
                // tween.Join(ui.transform.DOScale(Vector3.one * 0.003f, _act_duration));
                // tween.Join(petBar.DOAnchorPos(new Vector2(118, -132), _act_duration));
                // tween.Join(character.transform.DOLocalMoveX(0, _act_duration));
            }

            SetEffectActive(1, false);

            GetComponent <Animator>().SetBool("Big", false);

            running_tween = tween;
            tween.OnComplete(() => {
                showSmall();
                UpdatePetPosition();
                running_tween = null;

                if (offset != 0)
                {
                    gameObject.transform.localPosition = new Vector3(10 * offset, 0, 0);
                }
                else
                {
                    gameObject.transform.localPosition = Vector3.zero;
                }
            });
            tween.Play();
        }
Exemplo n.º 3
0
 public void setStatus(SHOW_STATUS status)
 {
     String moduleSettings = ModuleConfig.GetSettings();
     Data.Shows shows = new Fpp.WebModules.Data.Shows(moduleSettings);
     shows.setStatus(_id, (int)status);
 }