Exemple #1
0
 public static Vector3 GetShipOffsPos(ShipModel_Attacker model, MstShipGraphColumn iColumn)
 {
     if (model == null)
     {
         return(Vector3.zero);
     }
     return(GetShipOffsPos(model.GetGraphicsMstId(), model.IsFriend(), model.DamagedFlg, iColumn));
 }
 private void _setShipInfo()
 {
     _flagShip            = _clsSupport.ShienShips[0];
     _shipTex.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(_flagShip);
     _shipTex.MakePixelPerfect();
     _shipTex.transform.localPosition = Util.Poi2Vec(new ShipOffset(_flagShip.GetGraphicsMstId()).GetFace(_flagShip.DamagedFlg));
     _shipShadow.mainTexture          = _shipTex.mainTexture;
     _shipShadow.MakePixelPerfect();
     _shipShadow.transform.localPosition = _shipTex.transform.localPosition;
 }
Exemple #3
0
 private void _setShipInfo(bool isFriend)
 {
     _ship = _clsAerial.GetTaikuShip(isFriend);
     _uiShip.mainTexture = ShipUtils.LoadTexture(_ship);
     _uiShip.MakePixelPerfect();
     _uiShip.transform.localPosition = Util.Poi2Vec(new ShipOffset(_ship.GetGraphicsMstId()).GetShipDisplayCenter(_ship.DamagedFlg));
     _uiShip.flip = ((!isFriend) ? UIBasicSprite.Flip.Horizontally : UIBasicSprite.Flip.Nothing);
     _uiShipShadow.mainTexture = _uiShip.mainTexture;
     _uiShipShadow.MakePixelPerfect();
     _uiShipShadow.flip = ((!isFriend) ? UIBasicSprite.Flip.Horizontally : UIBasicSprite.Flip.Nothing);
     _uiShipObj.transform.localRotation = ((!isFriend) ? Quaternion.EulerAngles(new Vector3(0f, 180f, 0f)) : Quaternion.EulerAngles(Vector3.zero));
 }
Exemple #4
0
        private void setShipsTexture(ShipModel_Attacker model)
        {
            Texture2D mainTexture = ShipUtils.LoadTexture(model.GetGraphicsMstId(), model.IsFriend() && model.DamagedFlg);
            Vector2   v           = ShipUtils.GetShipOffsPos(model, model.DamagedFlg, GetGraphColumn(_iList));

            foreach (UITexture item in _listShipTexture)
            {
                item.mainTexture = mainTexture;
                item.MakePixelPerfect();
                item.transform.localPosition = v;
            }
        }
        private void setShipsTexture(ShipModel_Attacker model)
        {
            Texture2D mainTexture = ShipUtils.LoadTexture(model.GetGraphicsMstId(), model.IsFriend() && model.DamagedFlg);
            Vector2   vector      = ShipUtils.GetShipOffsPos(model, model.DamagedFlg, this.GetGraphColumn(this._iList));

            using (List <UITexture> .Enumerator enumerator = this._listShipTexture.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    UITexture current = enumerator.get_Current();
                    current.mainTexture = mainTexture;
                    current.MakePixelPerfect();
                    current.get_transform().set_localPosition(vector);
                }
            }
        }
Exemple #6
0
 public static Texture2D LoadTexture(ShipModel_Attacker model)
 {
     return(LoadTexture(model.GetGraphicsMstId(), model.IsFriend() && model.DamagedFlg));
 }
Exemple #7
0
        private void setShipInfo()
        {
            ShipModel_Attacker torpedoCutInShip = this.getTorpedoCutInShip(this._clsRaigeki, true);

            if (torpedoCutInShip != null)
            {
                this._listShipTex.get_Item(0).mainTexture = ShipUtils.LoadTexture(torpedoCutInShip);
                this._listShipTex.get_Item(0).MakePixelPerfect();
                this._listShipTex.get_Item(0).get_transform().set_localPosition(Util.Poi2Vec(new ShipOffset(torpedoCutInShip.GetGraphicsMstId()).GetShipDisplayCenter(torpedoCutInShip.DamagedFlg)));
            }
            ShipModel_Attacker torpedoCutInShip2 = this.getTorpedoCutInShip(this._clsRaigeki, false);

            if (torpedoCutInShip2 != null)
            {
                this._listShipTex.get_Item(1).mainTexture = ShipUtils.LoadTexture(torpedoCutInShip2);
                this._listShipTex.get_Item(1).MakePixelPerfect();
                this._listShipTex.get_Item(1).get_transform().set_localPosition(ShipUtils.GetShipOffsPos(torpedoCutInShip2, MstShipGraphColumn.CutIn));
            }
            this._iList = this.getAnimationList(torpedoCutInShip, torpedoCutInShip2);
        }
        private void setShipInfo()
        {
            ShipModel_Attacker torpedoCutInShip = getTorpedoCutInShip(_clsRaigeki, isFriend: true);

            if (torpedoCutInShip != null)
            {
                _listShipTex[0].mainTexture = ShipUtils.LoadTexture(torpedoCutInShip);
                _listShipTex[0].MakePixelPerfect();
                _listShipTex[0].transform.localPosition = Util.Poi2Vec(new ShipOffset(torpedoCutInShip.GetGraphicsMstId()).GetShipDisplayCenter(torpedoCutInShip.DamagedFlg));
            }
            ShipModel_Attacker torpedoCutInShip2 = getTorpedoCutInShip(_clsRaigeki, isFriend: false);

            if (torpedoCutInShip2 != null)
            {
                _listShipTex[1].mainTexture = ShipUtils.LoadTexture(torpedoCutInShip2);
                _listShipTex[1].MakePixelPerfect();
                _listShipTex[1].transform.localPosition = ShipUtils.GetShipOffsPos(torpedoCutInShip2, MstShipGraphColumn.CutIn);
            }
            _iList = getAnimationList(torpedoCutInShip, torpedoCutInShip2);
        }