Beispiel #1
0
        private void SetShipTextureRestore(ShipModel_Defender model)
        {
            bool damagedFlgAfterRecovery = model.DamagedFlgAfterRecovery;
            int  shipStandingTexID       = ShipUtils.GetShipStandingTexID(model.IsFriend(), model.IsPractice(), damagedFlgAfterRecovery);

            if (!(_clsObject3D.mainTexture != null) || !(_clsObject3D.mainTexture.name == shipStandingTexID.ToString()))
            {
                _clsObject3D.mainTexture = ShipUtils.LoadTexture2Restore(model);
                _clsObject3D.MakePixelPerfect();
                _clsObject3D.transform.localScale    = _clsObject3D.transform.localScale * (float)model.Offsets.GetScaleMag_InBattle(model.DamagedFlgAfter);
                _clsObject3D.transform.localPosition = ShipUtils.GetShipOffsPos(model, damagedFlgAfterRecovery, MstShipGraphColumn.Foot);
            }
        }
Beispiel #2
0
        private void SetShipTextureRestore(ShipModel_Defender model)
        {
            bool damagedFlgAfterRecovery = model.DamagedFlgAfterRecovery;
            int  shipStandingTexID       = ShipUtils.GetShipStandingTexID(model.IsFriend(), model.IsPractice(), damagedFlgAfterRecovery);

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