private void changeNext()
    {
        int num = 1;

        MstID += num;
        int texNum = (!isDamaged) ? 9 : 10;

        for (int i = 0; i < 100; i++)
        {
            texture.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(MstID, texNum);

            if (texture.mainTexture != null)
            {
                break;
            }
            MstID += num;
            if (i == 99)
            {
                MstID = 1;
            }
        }
        texture.MakePixelPerfect();
        ShipModelMst model = new ShipModelMst(MstID);

        draw(model);
        texture.Update();
    }
Ejemplo n.º 2
0
 public static void PlayBossDeathCryVoice(ShipModelMst model)
 {
     if (SingletonMonoBehaviour <SoundManager> .Instance != null)
     {
         SingletonMonoBehaviour <SoundManager> .Instance.PlayVoice(SingletonMonoBehaviour <ResourceManager> .Instance.ShipVoice.Load(model.MstId, 22));
     }
 }
    private void Update()
    {
        if (!Input.GetKeyDown(KeyCode.P) && !Input.GetKeyDown(KeyCode.O))
        {
            return;
        }
        int num = Input.GetKeyDown(KeyCode.P) ? 1 : (-1);

        MstID += num;
        int texNum = (!isDamaged) ? 9 : 10;

        for (int i = 0; i < 100; i++)
        {
            texture.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(MstID, texNum);

            if (texture.mainTexture != null)
            {
                break;
            }
            MstID += num;
            if (i == 99)
            {
                MstID = 1;
            }
        }
        Vector3 localScale = base.transform.localScale;

        texture.MakePixelPerfect();
        base.transform.localScale = localScale;
        ShipModelMst model = new ShipModelMst(MstID);

        draw(model);
        texture.Update();
    }
Ejemplo n.º 4
0
    private void Update()
    {
        if (Input.GetKeyDown(112) || Input.GetKeyDown(111))
        {
            int num = (!Input.GetKeyDown(112)) ? -1 : 1;
            this.MstID += num;
            int texNum = (!this.isDamaged) ? 9 : 10;
            for (int i = 0; i < 100; i++)
            {
                this.texture.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(this.MstID, texNum);

                if (this.texture.mainTexture != null)
                {
                    break;
                }
                this.MstID += num;
                if (i == 99)
                {
                    this.MstID = 1;
                }
            }
            Vector3 localScale = base.get_transform().get_localScale();
            this.texture.MakePixelPerfect();
            base.get_transform().set_localScale(localScale);
            ShipModelMst model = new ShipModelMst(this.MstID);
            this.draw(model);
            this.texture.Update();
        }
    }
Ejemplo n.º 5
0
 private void Start()
 {
     shipID             = MIN_SHIP_ID;
     _clsCurrentShipMst = new ShipModelMst(shipID);
     Debug.Log(string.Empty + MIN_SHIP_ID + "|" + MAX_SHIP_ID);
     setShipID(shipID);
 }
Ejemplo n.º 6
0
    private void draw(ShipModelMst model)
    {
        switch (this.LocationType)
        {
        case Debug_CharacterChanger.GetLocation.GetFace:
            this.texture.get_transform().localPositionX((float)model.Offsets.GetFace(this.isDamaged).x);
            this.texture.get_transform().localPositionY((float)model.Offsets.GetFace(this.isDamaged).y);
            return;

        case Debug_CharacterChanger.GetLocation.GetSlotItemCategory:
            this.texture.get_transform().localPositionX((float)model.Offsets.GetSlotItemCategory(this.isDamaged).x);
            this.texture.get_transform().localPositionY((float)model.Offsets.GetSlotItemCategory(this.isDamaged).y);
            return;

        case Debug_CharacterChanger.GetLocation.GetShipDisplayCenter:
            this.texture.get_transform().localPositionX((float)model.Offsets.GetShipDisplayCenter(this.isDamaged).x);
            this.texture.get_transform().localPositionY((float)model.Offsets.GetShipDisplayCenter(this.isDamaged).y);
            return;

        case Debug_CharacterChanger.GetLocation.GetCutinSp1_InBattle:
            this.texture.get_transform().localPositionX((float)model.Offsets.GetCutinSp1_InBattle(this.isDamaged).x);
            this.texture.get_transform().localPositionY((float)model.Offsets.GetCutinSp1_InBattle(this.isDamaged).y);
            return;

        case Debug_CharacterChanger.GetLocation.GetCutin_InBattle:
            this.texture.get_transform().localPositionX((float)model.Offsets.GetCutin_InBattle(this.isDamaged).x);
            this.texture.get_transform().localPositionY((float)model.Offsets.GetCutin_InBattle(this.isDamaged).y);
            return;
        }
        this.texture.get_transform().localPositionX((float)model.Offsets.GetBoko(this.isDamaged).x);
        this.texture.get_transform().localPositionY((float)model.Offsets.GetBoko(this.isDamaged).y);
    }
        public void ChangeCharacter(ShipModel model, int DeckID)
        {
            this.shipModel = model;
            ShipModelMst model2    = (model == null) ? null : model;
            bool         isDamaged = model != null && model.IsDamaged();

            this.ChangeCharacter(model2, DeckID, isDamaged);
        }
Ejemplo n.º 8
0
        public void ChangeCharacter(ShipModel model, int DeckID)
        {
            shipModel = model;
            ShipModelMst model2    = (model == null) ? null : model;
            bool         isDamaged = model?.IsDamaged() ?? false;

            ChangeCharacter(model2, DeckID, isDamaged);
        }
Ejemplo n.º 9
0
 public static float GetVoiceLength(ShipModelMst model, int voiceNum)
 {
     if (SingletonMonoBehaviour <SoundManager> .Instance != null)
     {
         return(SingletonMonoBehaviour <SoundManager> .Instance.VoiceLength(SingletonMonoBehaviour <ResourceManager> .Instance.ShipVoice.Load(model.MstId, voiceNum)));
     }
     return(0f);
 }
 public void Initialize(ShipModelMst model, KeyControl kCtrl, Action callback)
 {
     this.init();
     this._callback      = callback;
     this._shipModelMst  = model;
     this._keyController = kCtrl;
     this.setShipTexture();
 }
Ejemplo n.º 11
0
 public void Initialize(ShipModelMst model, KeyControl kCtrl, Action callback)
 {
     init();
     _callback      = callback;
     _shipModelMst  = model;
     _keyController = kCtrl;
     setShipTexture();
 }
Ejemplo n.º 12
0
 public void Initialize(int graphicShipId, KeyControl kCtrl, Action callback)
 {
     init();
     _callback      = callback;
     _shipModelMst  = new ShipModelMst(graphicShipId);
     _keyController = kCtrl;
     setShipTexture();
 }
Ejemplo n.º 13
0
 private void PlayPortInVoice(ShipModelMst shipModel)
 {
     if (App.rand.Next(0, 2) == 0)
     {
         int voiceNum = App.rand.Next(2, 4);
         ShipUtils.PlayShipVoice(shipModel, voiceNum);
     }
 }
Ejemplo n.º 14
0
        public IEnumerator Play(int MstID, Action OnFinished)
        {
            panel.alpha = 1f;
            MotionList  = new Dictionary <int, Live2DModel.MotionType>();
            MotionList.Add(9, Live2DModel.MotionType.Love2);
            MotionList.Add(37, Live2DModel.MotionType.Port);
            MotionList.Add(1, Live2DModel.MotionType.Port);
            MotionList.Add(33, Live2DModel.MotionType.Port);
            MotionList.Add(96, Live2DModel.MotionType.Secret);
            MotionList.Add(43, Live2DModel.MotionType.Port);
            MotionList.Add(54, Live2DModel.MotionType.Battle);
            MotionList.Add(55, Live2DModel.MotionType.Port);
            MotionList.Add(56, Live2DModel.MotionType.Secret);
            MotionList.Add(94, Live2DModel.MotionType.Secret);
            MotionList.Add(46, Live2DModel.MotionType.Secret);
            if (MotionList.ContainsKey(MstID))
            {
                Live2DModel.MotionType motionType = MotionList[MstID];
            }
            SoundUtils.StopBGM();
            SingletonMonoBehaviour <FadeCamera> .Instance.SetTransitionRule(FadeCamera.TransitionRule.NONE);

            ShipModelMst model = new ShipModelMst(MstID);

            ShipCharacter.ChangeCharacter(model);
            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            yield return(new WaitForEndOfFrame());

            SoundUtils.PlaySE(SEFIleInfos.RewardGet2, null);
            WhiteMaskTweenAlpha.ResetToBeginning();
            WhiteMaskTweenAlpha.PlayForward();
            WhiteMaskTweenAlpha.SetOnFinished(delegate
            {
                throw new NotImplementedException("‚È‚É‚±‚ê");
                // SingletonMonoBehaviour<Live2DModel>.Instance.Play(base._003Cmotion_003E__0, null);

                ShipUtils.PlayShipVoice(model, 1);
            });
            yield return(new WaitForSeconds(6f));

            BGTweenAlpha.ResetToBeginning();
            BGTweenAlpha.PlayForward();
            CameraZoomTween.ResetToBeginning();
            CameraZoomTween.PlayForward();
            yield return(new WaitForSeconds(4.5f));

            WhiteMaskTweenAlpha.onFinished.Clear();
            WhiteMaskTweenAlpha.PlayReverse();
            yield return(new WaitForSeconds(WhiteMaskTweenAlpha.duration + 2f));

            TweenColor.Begin(WhiteMaskTweenAlpha.gameObject, 1f, Color.black);
            yield return(new WaitForSeconds(1.5f));

            OnFinished?.Invoke();
        }
 protected virtual bool CheckMstIDEnable(ShipModelMst model)
 {
     if (model == null)
     {
         this.Render.mainTexture = null;
         return(false);
     }
     return(true);
 }
Ejemplo n.º 16
0
 private void OnPartnerShipSelectFinished(ShipModelMst partnerShip)
 {
     XorRandom.Init(0u);
     StartupTaskManager.GetData().PartnerShipID = partnerShip.MstId;
     Observable.TimerFrame(10, FrameCountType.EndOfFrame).Subscribe(delegate
     {
         _ctrlPartnerSelect.Hide();
         StartupTaskManager.ReqMode(StartupTaskManager.StartupTaskManagerMode.PictureStoryShow);
     });
 }
Ejemplo n.º 17
0
 public void Initialize(ShipModelMst targetShipModel, KeyControl kCtrl, MarriageManager.OnFinish func = null)
 {
     this.on                  = true;
     this.startTime           = Time.get_time();
     this.Callback            = func;
     this.mTargetShipModelMst = targetShipModel;
     this.ch.mainTexture      = ShipUtils.LoadTexture(this.mTargetShipModelMst.GetGraphicsMstId(), 9 + Convert.ToInt32(false));
     this.ch.MakePixelPerfect();
     this.mKeyController = kCtrl;
 }
Ejemplo n.º 18
0
 public void Initialize(ShipModelMst targetShipModel, KeyControl kCtrl, OnFinish func = null)
 {
     on                  = true;
     startTime           = Time.time;
     Callback            = func;
     mTargetShipModelMst = targetShipModel;
     ch.mainTexture      = ShipUtils.LoadTexture(mTargetShipModelMst.GetGraphicsMstId(), 9 + Convert.ToInt32(value: false));
     ch.MakePixelPerfect();
     mKeyController = kCtrl;
 }
Ejemplo n.º 19
0
 public void ChangeCharacter(ShipModelMst model, int DeckID, bool isDamaged)
 {
     if (CheckMstIDEnable(model))
     {
         if (tweenPosition != null)
         {
             tweenPosition.enabled = false;
         }
         int graphicsMstId = model.GetGraphicsMstId();
         if (DeckID == -1)
         {
             Render.mainTexture = SingletonMonoBehaviour <Live2DModel> .Instance.ChangeCharacter(graphicsMstId, isDamaged);
         }
         else
         {
             Render.mainTexture = SingletonMonoBehaviour <Live2DModel> .Instance.ChangeCharacter(graphicsMstId, isDamaged, DeckID);
         }
         Point live2dBias  = model.Offsets.GetLive2dBias();
         float x           = live2dBias.x;
         Point live2dBias2 = model.Offsets.GetLive2dBias();
         L2dBias = new Vector3(x, live2dBias2.y, 0f);
         Point boko  = model.Offsets.GetBoko(isDamaged);
         float x2    = boko.x;
         Point boko2 = model.Offsets.GetBoko(isDamaged);
         ShipIn = new Vector3(x2, boko2.y, 0f);
         Point cutinSp1_InBattle = model.Offsets.GetCutinSp1_InBattle(isDamaged);
         float x3 = cutinSp1_InBattle.x;
         Point cutinSp1_InBattle2 = model.Offsets.GetCutinSp1_InBattle(isDamaged);
         ShipIn2 = new Vector3(x3, cutinSp1_InBattle2.y, 0f);
         Point boko3 = model.Offsets.GetBoko(isDamaged);
         ShipOut = new Vector3(1300f, boko3.y, 0f);
         if (SingletonMonoBehaviour <Live2DModel> .Instance.isLive2DModel)
         {
             UITexture render     = Render;
             Point     live2dSize = model.Offsets.GetLive2dSize();
             render.width = (int)((float)live2dSize.x * 1380f / 1024f);
             UITexture render2     = Render;
             Point     live2dSize2 = model.Offsets.GetLive2dSize();
             render2.height = live2dSize2.y;
             Transform transform   = base.transform;
             Point     boko4       = model.Offsets.GetBoko(isDamaged);
             int       y           = boko4.y;
             Point     live2dBias3 = model.Offsets.GetLive2dBias();
             transform.localPositionY(y + live2dBias3.y);
         }
         else
         {
             L2dBias = Vector3.zero;
             Transform transform2 = base.transform;
             Point     boko5      = model.Offsets.GetBoko(isDamaged);
             transform2.localPositionY(boko5.y);
             Render.MakePixelPerfect();
         }
     }
 }
Ejemplo n.º 20
0
 private void DrawCurrentInfo()
 {
     try
     {
         _clsCurrentShipMst = new ShipModelMst(shipID);
         GUILayout.Label($"[{_clsCurrentShipMst.Name}({_clsCurrentShipMst.Yomi})]艦ID:{_clsCurrentShipMst.MstId} GraphicID:{_clsCurrentShipMst.GetGraphicsMstId()}", new GUILayoutOption[0]);
     }
     catch
     {
     }
 }
Ejemplo n.º 21
0
 private void OnDestroy()
 {
     _mini1Obj = null;
     _mini2Obj = null;
     _mini3Obj = null;
     _ship1    = null;
     _ship2    = null;
     _ship3    = null;
     _ship     = null;
     _dock     = null;
 }
Ejemplo n.º 22
0
 private void OnDestroy()
 {
     this._mini1Obj = null;
     this._mini2Obj = null;
     this._mini3Obj = null;
     this._ship1    = null;
     this._ship2    = null;
     this._ship3    = null;
     this._ship     = null;
     this._dock     = null;
 }
Ejemplo n.º 23
0
 private void setShipID(int id)
 {
     this.shipID = Mathe.MinMax2(id, this.MIN_SHIP_ID, this.MAX_SHIP_ID);
     try
     {
         this._clsCurrentShipMst = new ShipModelMst(this.shipID);
     }
     catch
     {
     }
     this.UpdateShip();
     this.focusCamera();
 }
Ejemplo n.º 24
0
 private void Start()
 {
     this.shipID             = this.MIN_SHIP_ID;
     this._clsCurrentShipMst = new ShipModelMst(this.shipID);
     Debug.Log(string.Concat(new object[]
     {
         string.Empty,
         this.MIN_SHIP_ID,
         "|",
         this.MAX_SHIP_ID
     }));
     this.setShipID(this.shipID);
 }
Ejemplo n.º 25
0
 private void setShipID(int id)
 {
     shipID = Mathe.MinMax2(id, MIN_SHIP_ID, MAX_SHIP_ID);
     try
     {
         _clsCurrentShipMst = new ShipModelMst(shipID);
     }
     catch
     {
     }
     UpdateShip();
     focusCamera();
 }
Ejemplo n.º 26
0
 private void OnDestroy()
 {
     UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Fade);
     UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Background);
     UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_Ship);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_UpText);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_UpText_S);
     UserInterfacePortManager.ReleaseUtils.Release(ref mTexture_FailBackground);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_FailBox);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_FailDashInit);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_FailSpotTop);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_FailSpotBottom);
     UserInterfacePortManager.ReleaseUtils.Release(ref mSprite_FailTextbox);
     mGameObject_Upgrade       = null;
     mGameObject_SparkleInit   = null;
     mGameObjects_UpSpiritInit = null;
     mGameObject_UpStripe      = null;
     mGameObject_Failed        = null;
     mPortUpgradesModernizeShipLeaf_FailLeaf             = null;
     mPortUpgradesModernizeShipText_FailText             = null;
     mPortUpgradesModernizeShipReturnButton_ReturnButton = null;
     kamihubuki = null;
     if (mGameObjects_FailDashe != null)
     {
         for (int i = 0; i < mGameObjects_FailDashe.Length; i++)
         {
             mGameObjects_FailDashe[i] = null;
         }
     }
     mGameObjects_FailDashe = null;
     if (mGameObjects_UpSpirit != null)
     {
         for (int j = 0; j < mGameObjects_UpSpirit.Length; j++)
         {
             mGameObjects_UpSpirit[j] = null;
         }
     }
     mGameObjects_UpSpirit = null;
     if (mGameObjects_UpSparkle != null)
     {
         for (int k = 0; k < mGameObjects_UpSparkle.Length; k++)
         {
             mGameObjects_UpSparkle[k] = null;
         }
     }
     mGameObjects_UpSparkle = null;
     mTargetShipModelMst    = null;
     mKeyController         = null;
     waitAndVoiceCoroutine  = null;
 }
Ejemplo n.º 27
0
 private void _debugObject()
 {
     if (Mst_DataManager.Instance.Mst_shipgraph.ContainsKey(debugIndex))
     {
         ShipModelMst shipModelMst = new ShipModelMst(debugIndex);
         _uiShip.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(debugIndex, isDamaged: true);
         _uiShip.MakePixelPerfect();
         _uiShip.transform.localPosition = Util.Poi2Vec(new ShipOffset(debugIndex).GetShipDisplayCenter(damaged: true));
         _clsMessage1.UnInit();
         _clsMessage2.UnInit();
         _clsMessage1 = new Generics.Message(base.transform, "Message1");
         _clsMessage1.Init($"『{_clsDeck.Name}』艦隊<br>旗艦「{shipModelMst.Name}」が<br>大破しました。", 0.05f);
         _clsMessage2 = new Generics.Message(base.transform, "Message2");
         _clsMessage2.Init("進撃は困難です……帰投します。", 0.05f);
     }
 }
Ejemplo n.º 28
0
 private void _debugObject()
 {
     if (Mst_DataManager.Instance.Mst_shipgraph.ContainsKey(this.debugIndex))
     {
         ShipModelMst shipModelMst = new ShipModelMst(this.debugIndex);
         this._uiShip.mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(this.debugIndex, true);
         this._uiShip.MakePixelPerfect();
         this._uiShip.get_transform().set_localPosition(Util.Poi2Vec(new ShipOffset(this.debugIndex).GetShipDisplayCenter(true)));
         this._clsMessage1.UnInit();
         this._clsMessage2.UnInit();
         this._clsMessage1 = new Generics.Message(base.get_transform(), "Message1");
         this._clsMessage1.Init(string.Format("『{0}』艦隊<br>旗艦「{1}」が<br>大破しました。", this._clsDeck.Name, shipModelMst.Name), 0.05f, null);
         this._clsMessage2 = new Generics.Message(base.get_transform(), "Message2");
         this._clsMessage2.Init("進撃は困難です……帰投します。", 0.05f, null);
     }
 }
 protected override bool CheckMstIDEnable(ShipModelMst model)
 {
     if (model == null)
     {
         this.Render.mainTexture = null;
         if (this.collision != null)
         {
             this.collision.SetActive(false);
         }
         return(false);
     }
     if (this.collision != null)
     {
         this.collision.SetActive(true);
     }
     return(true);
 }
 private void _debugShipTexture()
 {
     if (Mst_DataManager.Instance.Mst_shipgraph.ContainsKey(_debugIndex))
     {
         ShipModelMst shipModelMst = new ShipModelMst(_debugIndex);
         _uiShip[0].mainTexture = KCV.Battle.Utils.ShipUtils.LoadTexture(_debugIndex, isDamaged: true);
         _uiShip[0].MakePixelPerfect();
         _uiShip[0].transform.localPosition = Util.Poi2Vec(new ShipOffset(_debugIndex).GetShipDisplayCenter(damaged: true));
         _uiShip[1].mainTexture             = KCV.Battle.Utils.ShipUtils.LoadTexture(_debugIndex, isDamaged: false);
         _uiShip[1].MakePixelPerfect();
         _uiShip[1].transform.localPosition = Util.Poi2Vec(new ShipOffset(_debugIndex).GetShipDisplayCenter(damaged: false));
         _uiLabel1.text = shipModelMst.Name + " Lv" + 100 + "が大きく損傷しています。";
         _uiLabel2.text = "随伴艦の" + shipModelMst.Name + "を護衛につけて戦場から退避させますか?";
         _uiLabel1.MakePixelPerfect();
         _uiLabel2.MakePixelPerfect();
     }
 }