コード例 #1
0
        public int GetDispATAt(Hex coord)
        {
            MiroModelV1 model = _GridCtrl.GetMiroModelAt(coord);

            if (model == null)
            {
                return(-1);
            }

            int dispAT =
                model.GetDispAT();

            return(dispAT);
        }
コード例 #2
0
ファイル: MiroV1ATDisp.cs プロジェクト: shacleff/LianQiClient
        public void UpdateDisp()
        {
            int at = _model.GetDispAT();

            if (at != _ATPrev)
            {
                UpdateCharAnim(at);

                List <MiroV1WeaponBase> wps = _model.GetAttackingWeapons();
                HighlightAT(wps);

                float lrWd = _StrokeWidthOnAT.Evaluate(at);
                foreach (LineRenderer lr in _StrokeLineRenderers)
                {
                    lr.widthMultiplier = lrWd;
                }

                float scl = _CharScaleOnAT.Evaluate(at);
                _CharTF.localScale = new Vector3(scl, scl, 1.0f);

                float escl = _EdgeHaloScaleOnAT.Evaluate(at);
                _EdgeObj.transform.localScale = new Vector3(escl, escl, 1.0f);

                _ATPrev = at;
            }

            SpriteColorCtrl scolorCtrl =
                _EdgeObj.GetComponent <SpriteColorCtrl> ();

            if (at == 0)
            {
                scolorCtrl._id = 0;
                _animCtrl.gameObject.SetActive(false);
            }
            else
            {
                scolorCtrl._id = 1;
                _animCtrl.gameObject.SetActive(true);
            }

            SetLineRenderersColor();

            SetKeepHighlighting(_KeepHighlighting);
        }