コード例 #1
0
        public static Texture2D LoadBannerTextureInTacticalSituation(ShipModel_BattleAll model)
        {
            int texNum;

            if (model.IsFriend())
            {
                texNum = ((!model.DamagedFlgEnd) ? 1 : 2);
            }
            else
            {
                texNum = ((!model.IsPractice()) ? 1 : ((!model.DamagedFlgEnd) ? 1 : 2));
            }
            return(SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(ShipUtils.SPConvertShipBannerID(model), texNum));
        }
コード例 #2
0
        private void SetShipTexture(ShipModel_BattleAll model, bool isStart)
        {
            bool isDamaged         = (!isStart) ? model.DamagedFlgEnd : model.DamagedFlgStart;
            int  shipStandingTexID = ShipUtils.GetShipStandingTexID(model.IsFriend(), model.IsPractice(), isDamaged);

            if (!(_clsObject3D.mainTexture != null) || !(_clsObject3D.mainTexture.name == shipStandingTexID.ToString()))
            {
                _clsObject3D.mainTexture = ShipUtils.LoadTexture(model, isStart);
                _clsObject3D.MakePixelPerfect();
                _clsObject3D.transform.localScale    = _clsObject3D.transform.localScale * (float)model.Offsets.GetScaleMag_InBattle(model.DamagedFlgStart);
                _clsObject3D.transform.localPosition = ShipUtils.GetShipOffsPos(model, isDamaged, MstShipGraphColumn.Foot);
            }
        }
コード例 #3
0
        private void SetShipTexture(ShipModel_BattleAll model, bool isStart)
        {
            bool isDamaged         = (!isStart) ? model.DamagedFlgEnd : model.DamagedFlgStart;
            int  shipStandingTexID = ShipUtils.GetShipStandingTexID(model.IsFriend(), model.IsPractice(), isDamaged);

            if (this._clsObject3D.mainTexture != null && this._clsObject3D.mainTexture.get_name() == shipStandingTexID.ToString())
            {
                return;
            }
            this._clsObject3D.mainTexture = ShipUtils.LoadTexture(model, isStart);
            this._clsObject3D.MakePixelPerfect();
            this._clsObject3D.get_transform().set_localScale(this._clsObject3D.get_transform().get_localScale() * (float)model.Offsets.GetScaleMag_InBattle(model.DamagedFlgStart));
            this._clsObject3D.get_transform().set_localPosition(ShipUtils.GetShipOffsPos(model, isDamaged, MstShipGraphColumn.Foot));
        }