예제 #1
0
파일: ready.cs 프로젝트: CD-mon/QAZE-main
    // Update is called once per frame
    public void setLine(int i)
    {
        switch (i)
        {
        case 0: {
            readyAni.SetTrigger("on");
            Qs.SetActive(true);
            Enter.SetActive(true);
            EQ.SetActive(true);
            on[8] = false;
        } break;

        case 1: {
            readyAni.SetTrigger("on");
            As.SetActive(true);
            Enter.SetActive(true);
            EA.SetActive(true);
            on[8] = false;
        } break;

        case 2: {
            readyAni.SetTrigger("on");
            Zs.SetActive(true);
            Enter.SetActive(true);
            EZ.SetActive(true);
            on[8] = false;
        } break;
        }
    }
예제 #2
0
        private void SetVisible(bool value)
        {
            var newstate = Game.Data.Get("loader_visible", false);

            if (curstate == newstate)
            {
                return;
            }
            curstate = newstate;
            ez?.Kill();
            var circle_from = fg.color;
            var fader_from  = bg.color;

            cv.enabled = true;
            gameObject.SetActive(true);
            if (newstate)
            {
                ez = EZ.SpawnGlobal().Add(0.1f, pt =>
                {
                    fg.color = Color.Lerp(circle_from, Color.black, pt);
                    bg.color = Color.Lerp(fader_from, Color.white, pt);
                });
            }
            else
            {
                ez = EZ.SpawnGlobal().Add(0.1f, pt => {
                    fg.color = Color.Lerp(circle_from, Color.clear, pt);
                    bg.color = Color.Lerp(fader_from, Color.clear, pt);
                }).Add(() =>
                {
                    cv.enabled = false;
                });
            }
        }
예제 #3
0
        void InvokeMessage(object arg)
        {
            var str = (string)arg;

            label.text  = str;
            cnv.enabled = true;
            var tf = (RectTransform)label.transform;

            tf.anchoredPosition = Vector3.zero;
            var transp = new Color(1, 1, 1, 0);

            ez?.Kill();
            ez = EZ.SpawnGlobal().Add(t =>
            {
                t             = EZ.BackOut(t);
                tf.localScale = Vector3.one * t;
                label.color   = Color.Lerp(transp, Color.white, t);
            }).Wait(0.3f).Add(t =>
            {
                t             = EZ.QuadIn(1 - t);
                tf.localScale = Vector3.one * t;
                label.color   = Color.Lerp(transp, Color.white, t);
            }).Add(() =>
            {
                cnv.enabled = false;
            });
        }
예제 #4
0
        void SetActive(bool value = false)
        {
            Log.Trace($"{this}: {fieldName} = {value}", gameObject);
            if (value == current)
            {
                return;
            }
            current = value;
            ez?.Kill();
            _canvas.enabled = true;
            var pos_from = window.localPosition;

            _fader.color = new Color(0, 0, 0, value ? 0 : 0.7f);
            if (value)
            {
                ez = EZ.Spawn(global).Add(t =>
                {
                    t                    = EZ.BackOut(t);
                    var c                = _fader.color;
                    c.a                  = t * 0.7f;
                    _fader.color         = c;
                    window.localPosition = Vector3.LerpUnclamped(pos_from, Vector3.zero, t);
                });
            }
            else
            {
                ez = EZ.Spawn(global).Add(t =>
                {
                    var c                = _fader.color;
                    c.a                  = (1 - t) * 0.7f;
                    _fader.color         = c;
                    window.localPosition = Vector3.LerpUnclamped(pos_from, offscreen, t);
                }).Add(() =>
                {
                    _fader.color    = new Color(0, 0, 0, 0);
                    _canvas.enabled = false;
                });
            }
        }
예제 #5
0
파일: Return.cs 프로젝트: CD-mon/QAZE-main
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Return))
        {
            if (QS.activeSelf)
            {
                AS.SetActive(true);
                QS.SetActive(false);
                ZS.SetActive(false);

                EA.SetActive(true);
                EQ.SetActive(false);
                EZ.SetActive(false);
            }
            else if (AS.activeSelf)
            {
                ZS.SetActive(true);
                QS.SetActive(false);
                AS.SetActive(false);

                EZ.SetActive(true);
                EQ.SetActive(false);
                EA.SetActive(false);
            }
            else if (ZS.activeSelf)
            {
                QS.SetActive(true);
                AS.SetActive(false);
                ZS.SetActive(false);

                EQ.SetActive(true);
                EA.SetActive(false);
                EZ.SetActive(false);
            }
        }
    }
예제 #6
0
파일: HomeParams.cs 프로젝트: licanwen/op
        //"0,0,100,0,10,0,1000"
#pragma warning disable CS1591 // 缺少对公共可见类型或成员“HomeParams.ToString()”的 XML 注释
        public override string ToString()
#pragma warning restore CS1591 // 缺少对公共可见类型或成员“HomeParams.ToString()”的 XML 注释
        {
            return(Dir.ToString() + "," + EZ.ToString() + "," + MaxVel.ToString() + "," + Mode.ToString() + ","
                   + OrgVel.ToString() + "," + ZeroOffset.ToString() + "," + Timeout.ToString());
        }
예제 #7
0
 //"0,0,100,0,10,0,1000"
 public override string ToString()
 {
     return(Dir.ToString() + "," + EZ.ToString() + "," + MaxVel.ToString() + "," + Mode.ToString() + ","
            + OrgVel.ToString() + "," + ZeroOffset.ToString() + "," + Timeout.ToString());
 }