private BtlCut_ResultShip VitualCtor(ShipModel_BattleResult model)
        {
            this._clsShipModel = model;
            int texNum = (!model.DamagedFlgStart) ? 1 : 2;

            this._uiBannerTexBefore.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(this._clsShipModel.MstId, texNum);

            if (model.DmgStateStart == DamageState_Battle.Gekichin || model.IsEscape())
            {
                this._uiBannerTexBefore.shader = SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(0);
            }
            if (model.DmgStateStart != DamageState_Battle.Normal)
            {
                this.DamageSmoke.spriteName = string.Format("icon-ss_burned_{0}", model.DmgStateStart.ToString());
                this.DamageSmoke.alpha      = 1f;
            }
            this.DamageIcon.spriteName = ((!model.IsEscape()) ? ("icon-ss_" + model.DmgStateStart.ToString()) : "icon-ss_taihi");
            this.DamageIcon.alpha      = ((!model.IsEscape()) ? ((model.DmgStateStart == DamageState_Battle.Normal) ? 0f : 1f) : 1f);
            this.Level.textInt         = model.Level;
            this.HPLabel.text          = string.Format("{0} / {1}", model.HpStart, model.MaxHp);
            this._uiHPSlider.value     = Mathe.Rate(0f, (float)model.MaxHp, (float)model.HpStart);
            this._uiHPSlider.foregroundWidget.color = Util.HpGaugeColor2(model.MaxHp, model.HpStart);
            this.beforeHP           = model.HpStart;
            this.levelUpCount       = 0;
            this._uiEXPSlider.value = Mathe.Rate(0f, 100f, (float)model.ExpInfo.ExpRateBefore);
            return(this);
        }
        private BtlCut_ResultShip VitualCtor(ShipModel_BattleResult model)
        {
            _clsShipModel = model;
            int texNum = (!model.DamagedFlgStart) ? 1 : 2;

            _uiBannerTexBefore.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(_clsShipModel.MstId, texNum);

            if (model.DmgStateStart == DamageState_Battle.Gekichin || model.IsEscape())
            {
                _uiBannerTexBefore.shader = SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[0];
            }
            if (model.DmgStateStart != 0)
            {
                DamageSmoke.spriteName = $"icon-ss_burned_{model.DmgStateStart.ToString()}";
                DamageSmoke.alpha      = 1f;
            }
            DamageIcon.spriteName = ((!model.IsEscape()) ? ("icon-ss_" + model.DmgStateStart.ToString()) : "icon-ss_taihi");
            DamageIcon.alpha      = (model.IsEscape() ? 1f : ((model.DmgStateStart == DamageState_Battle.Normal) ? 0f : 1f));
            Level.textInt         = model.Level;
            HPLabel.text          = $"{model.HpStart} / {model.MaxHp}";
            _uiHPSlider.value     = Mathe.Rate(0f, model.MaxHp, model.HpStart);
            _uiHPSlider.foregroundWidget.color = Util.HpGaugeColor2(model.MaxHp, model.HpStart);
            beforeHP           = model.HpStart;
            levelUpCount       = 0;
            _uiEXPSlider.value = Mathe.Rate(0f, 100f, model.ExpInfo.ExpRateBefore);
            return(this);
        }
        private void ShipTexUpdate()
        {
            if (act != null)
            {
                act();
            }
            int texNum = (!_clsShipModel.DamagedFlgEnd) ? 1 : 2;

            _uiBannerTexAfter.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(_clsShipModel.MstId, texNum);

            if (_clsShipModel.DmgStateEnd == DamageState_Battle.Gekichin || _clsShipModel.IsEscape())
            {
                _uiBannerTexAfter.shader = SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[0];
            }
            _uiBannerTexAfter.transform.ValueTo(0f, 1f, 0.8f, iTween.EaseType.linear, delegate(object x)
            {
                _uiBannerTexAfter.alpha = Convert.ToSingle(x);
            }, null);
            _uiBannerTexBefore.transform.ValueTo(1f, 0f, 0.8f, iTween.EaseType.linear, delegate(object x)
            {
                _uiBannerTexBefore.alpha = Convert.ToSingle(x);
            }, null);
            DamageSmoke.spriteName = "icon-ss_burned_" + _clsShipModel.DmgStateEnd.ToString();
            DamageIcon.spriteName  = ((!_clsShipModel.IsEscape()) ? ("icon-ss_" + _clsShipModel.DmgStateEnd.ToString()) : "icon-ss_taihi");
            TweenAlpha.Begin(DamageSmoke.gameObject, 0.8f, 1f);
            TweenAlpha.Begin(DamageIcon.gameObject, 0.8f, 1f);
        }
示例#4
0
 public virtual void SetShipData(ShipModel_BattleResult model)
 {
     _clsIShipModel = model;
     if (model != null)
     {
         _uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model);
         _uiShipTex.localSize   = ResourceManager.SHIP_TEXTURE_SIZE[(!model.IsDamaged()) ? 1 : 2];
         _uiShipTex.shader      = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[1] : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList[0]);
         UpdateDamage(model.DmgStateEnd, model.IsEscape());
     }
 }
示例#5
0
 public virtual void SetShipData(ShipModel_BattleResult model)
 {
     this._clsIShipModel = model;
     if (model == null)
     {
         return;
     }
     this._uiShipTex.mainTexture = ShipUtils.LoadBannerTexture(model);
     this._uiShipTex.localSize   = ResourceManager.SHIP_TEXTURE_SIZE.get_Item((!model.IsDamaged()) ? 1 : 2);
     this._uiShipTex.shader      = ((model.DmgStateEnd != DamageState_Battle.Gekichin && !model.IsEscape()) ? SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(1) : SingletonMonoBehaviour <ResourceManager> .Instance.shader.shaderList.get_Item(0));
     this.UpdateDamage(model.DmgStateEnd, model.IsEscape());
 }