public void PlayVoice(DeckModel deck) { if (!isEnsei(deck) && !isTettai(deck) && deck.GetFlagShip() != null) { ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2); } }
public void change_2_SUPPLY_PROCESS(SupplyType supplyType) { if (_status != 0 && _status != ScreenStatus.RIGHT_PAIN_WORK) { return; } _status = ScreenStatus.SUPPLY_PROCESS; _otherListParent.LockControl(); _commonDeckSwitchManager.keyControlEnable = false; if (supplyType == SupplyType.All) { ShipModel model; if (isNotOther() && _currentDeck.GetShipCount() == getSelectedShipList().Count) { int mstId = _currentDeck.GetFlagShip().MstId; model = _currentDeck.GetFlagShip(); } else { List <ShipModel> selectedShipList = getSelectedShipList(); int index = UnityEngine.Random.Range(0, selectedShipList.Count); int mstId2 = selectedShipList[index].MstId; model = selectedShipList[index]; } ShipUtils.PlayShipVoice(model, 27); } SetShipSelectFocus(focused: false); _rightPane.LostFocus(); _rightPane.SetEnabled(enabled: false); _rightPane.DoWindowOpenAnimation(supplyType); Supply(supplyType); }
public void PlayVoice(DeckModel deck) { if (this.isEnsei(deck) || this.isTettai(deck) || deck.GetFlagShip() == null) { return; } ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2); }
public void UpdateDeckInfo(bool isShort = false) { DeckModel currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck; ShipModel shipModel = (currentDeck == null) ? null : currentDeck.GetFlagShip(); this.DeckName.supportEncoding = false; if (shipModel == null) { this.DeckName.text = string.Empty; return; } if (isShort) { this.DeckName.text = "旗艦 " + shipModel.ShipTypeName + " " + shipModel.Name; } else { this.DeckName.text = string.Concat(new string[] { currentDeck.Name, "旗艦\n", shipModel.ShipTypeName, " ", shipModel.Name }); } }
private void ChangeFocusDeck(DeckModel deckModel) { focusedDeckModel = deckModel; if (focusedDeckModel != null) { mUIRemodelShipSlider.Initialize(focusedDeckModel); ChangeFocusShip(focusedDeckModel.GetFlagShip()); } }
private bool IsValidSelectable(PortManager portManager, DeckModel deckModel, UIPortMenuButton portMenuButton) { Generics.Scene scene = portMenuButton.GetScene(); if (scene != Generics.Scene.Marriage) { return(SingletonMonoBehaviour <AppInformation> .Instance.IsValidMoveToScene(portMenuButton.GetScene())); } return(portManager.IsValidMarriage(deckModel.GetFlagShip().MemId)); }
public DeckModel changeDeck(int DeckID) { if (prevDeckID == DeckID) { return(null); } prevDeckID = DeckID; DeckModel deck = LogicMng.UserInfo.GetDeck(DeckID); SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeckAreaModel = StrategyTopTaskManager.GetLogicManager().Area[deck.AreaId]; if (deck.GetFlagShip() != null) { deck.GetFlagShip().IsDamaged(); } StrategyTopTaskManager.Instance.GetInfoMng().changeCharacter(deck); StrategyTopTaskManager.Instance.UIModel.Character.setState(deck); StrategyTopTaskManager.Instance.GetInfoMng().updateFooterInfo(isUpdateMaterial: false); return(deck); }
private void DecideFleetSelector(DeckModel model) { DebugUtils.Log("RebellionOrganizeCtrl", $"[{model.Id}({model.Name})]{((model.GetFlagShip() == null) ? string.Empty : model.GetFlagShip().Name)}"); if (_uiParticipatingFleetSelector.isSortieStartFocus) { DecideSortieStart(); } else if (!SetRebellionParticipatingFleet((RebellionFleetType)_uiParticipatingFleetSelector.nowIndex, _uiFleetSelector.nowSelectedDeck)) { } }
public bool IsGoPort(DeckModel deckModel) { bool flag = deckModel.GetFlagShip() != null; bool flag2 = !deckModel.HasBling(); if (flag && flag2) { return(true); } return(false); }
private IEnumerator PlayTransition(MapModel mapModel, DeckModel deck) { Camera cam = GameObject.Find("TopCamera").GetComponent <Camera>(); AsyncOperation asyncOpe = Application.LoadLevelAsync(Generics.Scene.SortieAreaMap.ToString()); asyncOpe.allowSceneActivation = false; yield return(null); MapTransitionCutManager mtcm = Util.Instantiate(Resources.Load("Prefabs/StrategyPrefab/MapSelect/MapTransitionCut"), base.transform.root.Find("Map Root").gameObject).GetComponent <MapTransitionCutManager>(); mtcm.transform.localPosition = cam.transform.localPosition + new Vector3(-26.4f, -43f, 496.4f); mtcm.Initialize(mapModel, asyncOpe); ShipUtils.PlayShipVoice(deck.GetFlagShip(), 14); }
private void BackToSailSelect() { StrategyTopTaskManager.Instance.UIModel.HowToStrategy.isForceHide(); StrategyTopTaskManager.Instance.GetInfoMng().updateFooterInfo(isUpdateMaterial: true); dialogKeyController.IsRun = true; StrategyTopTaskManager.GetSailSelect().CloseCommonDialog(); StrategyTopTaskManager.Instance.setActiveStrategy(isActive: true); SingletonMonoBehaviour <UIShortCutMenu> .Instance.IsInputEnable = true; SingletonMonoBehaviour <Live2DModel> .Instance.Enable(); ListParent.SetActive(isActive: false); if (CurrentDeck.GetFlagShip() == null) { StrategyTopTaskManager.GetSailSelect().SearchAndChangeDeck(isNext: false, isSeachLocalArea: false); StrategyTopTaskManager.Instance.UIModel.Character.ChangeCharacter(SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck); } UIRebellionOrgaizeShipBanner[] shipStates = ShipStates; foreach (UIRebellionOrgaizeShipBanner uIRebellionOrgaizeShipBanner in shipStates) { uIRebellionOrgaizeShipBanner.UnsetFocus(); } FocusBanner = null; }
public void endConstruct() { this._limit = 0; this._uiGetBtn.get_transform().set_localScale(Vector3.get_one()); this._uiBg2.alpha = 1f; this._uiHighBtn.get_transform().set_localScale(Vector3.get_zero()); this.btnLight.StopAnim(); DeckModel currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck; ShipModel shipModel = (currentDeck == null) ? new ShipModel(1) : currentDeck.GetFlagShip(); if (this.cor == null && !this.taskMainArsenalManager.IsShipGetViewAllDock()) { this.cor = base.StartCoroutine(this.PlayCompleteVoiceWaitForFlagOn(shipModel)); } }
public void endConstruct() { _limit = 0; _uiGetBtn.transform.localScale = Vector3.one; _uiBg2.alpha = 1f; _uiHighBtn.transform.localScale = Vector3.zero; btnLight.StopAnim(); DeckModel currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck; ShipModel shipModel = (currentDeck == null) ? new ShipModel(1) : currentDeck.GetFlagShip(); if (cor == null && !taskMainArsenalManager.IsShipGetViewAllDock()) { cor = StartCoroutine(PlayCompleteVoiceWaitForFlagOn(shipModel)); } }
public void SetFleetInfo(DeckModel model) { this._clsDeckMode = model; if (model == null) { this._uiShipBanner.mainTexture = null; this._uiFleetNum.spriteName = string.Empty; this._clsDelta.isFlasing = false; return; } ShipModel flagShip = model.GetFlagShip(); this._uiShipBanner.mainTexture = ShipUtils.LoadBannerTexture(flagShip); this._uiFleetNum.spriteName = string.Format("icon_deck{0}", model.Id); this._clsDelta.isFlasing = true; }
public void SetFleetInfo(DeckModel model) { _clsDeckMode = model; if (model == null) { _uiShipBanner.mainTexture = null; _uiFleetNum.spriteName = string.Empty; _clsDelta.isFlasing = false; } else { ShipModel flagShip = model.GetFlagShip(); _uiShipBanner.mainTexture = ShipUtils.LoadBannerTexture(flagShip); _uiFleetNum.spriteName = $"icon_deck{model.Id}"; _clsDelta.isFlasing = true; } }
public void UpdateDeckInfo(bool isShort = false) { DeckModel currentDeck = SingletonMonoBehaviour <AppInformation> .Instance.CurrentDeck; ShipModel shipModel = currentDeck?.GetFlagShip(); DeckName.supportEncoding = false; if (shipModel == null) { DeckName.text = string.Empty; } else if (isShort) { DeckName.text = "旗艦 " + shipModel.ShipTypeName + " " + shipModel.Name; } else { DeckName.text = currentDeck.Name + "旗艦\n" + shipModel.ShipTypeName + " " + shipModel.Name; } }
public void ChangeCharacter(DeckModel deck) { ShipModel shipModel = deck.GetFlagShip(); if (deck != null && deck.MissionState != MissionStates.NONE) { shipModel = null; } if (SingletonMonoBehaviour <Live2DModel> .Instance != null && !SingletonMonoBehaviour <Live2DModel> .Instance.isLive2DModel && StrategyShipCharacter.nowShipModel != null && shipModel != null && (StrategyShipCharacter.nowShipModel.GetGraphicsMstId() != shipModel.GetGraphicsMstId() || !shipModel.IsDamaged()) && this.Render != null && this.Render.mainTexture != null) { Resources.UnloadAsset(this.Render.mainTexture); this.Render.mainTexture = null; } base.ChangeCharacter(shipModel, deck.Id); StrategyShipCharacter.nowShipModel = shipModel; if (this.collision != null) { this.collision.ResetTouchCount(); if (this.Render != null) { this.collision.SetCollisionHight(this.Render.height); } } }
public void Initialize(DeckModel deckModel, List <IsGoCondition> conditions) { this.mDeckModel = deckModel; this.mConditions = conditions; this.mTexture_DeckNo.mainTexture = Resources.Load <Texture>(string.Format("Textures/Common/DeckFlag/icon_deck{0}", deckModel.Id)); this.mTexture_FlagShip.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(deckModel.GetFlagShip().MstId, (!deckModel.GetFlagShip().IsDamaged())? 1 : 2); bool battleCondition = this.IsStartBattleCondition(); this.InitializeCondition(battleCondition); }
public void SetDeckInfo(DeckModel model, IsGoCondition Condition) { this.ShipBanner.SetShipData(model.GetFlagShip()); this.DeckNumberIcon.spriteName = "icon_deck" + model.Id; this.ReasonLabel.text = Util.getCancelReason(Condition); }
public bool Init(List <DeckModel> models, int initIndex, DelDecideRebellionOrganizeFleetSelector decideDelegate) { DebugUtils.Log("UIRebellionFleetSelector", string.Empty); this._listDeckModels = models; this._nSelectedIndex = initIndex; this._delDecideRebellionOrganizeFleetSelector = decideDelegate; this.SetFleetInfos(initIndex); using (IEnumerator enumerator = this._clsRouletteSelector.GetContainer().get_transform().GetEnumerator()) { while (enumerator.MoveNext()) { Transform transform = (Transform)enumerator.get_Current(); Object.Destroy(transform.get_gameObject()); } } int num = 0; using (List <DeckModel> .Enumerator enumerator2 = models.GetEnumerator()) { while (enumerator2.MoveNext()) { DeckModel current = enumerator2.get_Current(); this._listSelectorShips.Add(UIRebellionSelectorShip.Instantiate(this._prefabSelectorShip.GetComponent <UIRebellionSelectorShip>(), this._clsRouletteSelector.get_transform(), Vector3.get_zero(), current.GetFlagShip())); this._listSelectorShips.get_Item(num).get_transform().set_name("SelectorShips" + num); num++; } } this._clsRouletteSelector.Init(this); this._clsRouletteSelector.SetKeyController(StrategyTaskManager.GetStrategyRebellion().keycontrol); this._clsRouletteSelector.ScaleForce(0.3f, 1f); return(true); }
private IEnumerator PlayCoroutine() { Stopwatch stopWatch = new Stopwatch(); stopWatch.Reset(); stopWatch.Start(); ShipModel friendFlagShipModel = mFriendDeck.GetFlagShip(); mTexture_FriendFlagShip.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(friendFlagShipModel.GetGraphicsMstId(), (!friendFlagShipModel.IsDamaged())? 9 : 10); mTexture_FriendFlagShip.MakePixelPerfect(); mTexture_FriendFlagShip.transform.localPosition = Util.Poi2Vec(friendFlagShipModel.Offsets.GetFace(friendFlagShipModel.IsDamaged())); ShipModel targetFlagShipModel = mTargetDeck.GetFlagShip(); mTexture_TargetFlagShip.mainTexture = SingletonMonoBehaviour <ResourceManager> .Instance.ShipTexture.Load(targetFlagShipModel.GetGraphicsMstId(), (!targetFlagShipModel.IsDamaged())? 9 : 10); mTexture_TargetFlagShip.MakePixelPerfect(); mTexture_TargetFlagShip.transform.localPosition = Util.Poi2Vec(targetFlagShipModel.Offsets.GetFace(targetFlagShipModel.IsDamaged())); InitializeFriendDeckInShips(mFriendDeck); InitializeTargetDeckInShips(mTargetDeck); yield return(new WaitForEndOfFrame()); stopWatch.Stop(); for (int frame = 0; frame < stopWatch.Elapsed.Milliseconds / 60; frame++) { yield return(new WaitForEndOfFrame()); } yield return(new WaitForEndOfFrame()); mPanelThis.alpha = 1f; mTransform_FriendFlagShipFrame.localPositionY(-1024f); mTransform_TargetFlagShipFrame.localPositionY(1024f); Sequence tweenDeckInShipViewsSequence = DOTween.Sequence().SetId(this); tweenDeckInShipViewsSequence.Join(mTransform_FriendFlagShipFrame.DOLocalMove(mVector3_FriendShipShowPosition, 0.3f).SetId(this)); tweenDeckInShipViewsSequence.Join(mTransform_TargetFlagShipFrame.DOLocalMove(mVector3_TargetShipShowPosition, 0.3f).SetId(this)); int shipCount = (mTargetDeck.Count > mFriendDeck.Count) ? mTargetDeck.Count : mFriendDeck.Count; for (int index = 0; index < shipCount; index++) { Sequence tweenObject = DOTween.Sequence().SetId(this); if (index < mFriendDeck.Count) { mUIPracticeBattleDeckInShips_Friend[index].transform.localPositionX(-500f); tweenObject.Join(mUIPracticeBattleDeckInShips_Friend[index].transform.DOLocalMoveX(0f, 0.5f).SetId(this)); } if (index < mTargetDeck.Count) { mUIPracticeBattleDeckInShips_Enemy[index].transform.localPositionX(500f); tweenObject.Join(mUIPracticeBattleDeckInShips_Enemy[index].transform.DOLocalMoveX(0f, 0.5f).SetId(this)); } tweenObject.SetDelay(0.25f); tweenDeckInShipViewsSequence.Join(tweenObject); } Sequence tweenCrashFlagShipsTween = DOTween.Sequence().SetId(this); Sequence s = tweenCrashFlagShipsTween; Transform target = mTransform_FriendFlagShipFrame; Vector3 localPosition = mTransform_FriendFlagShipFrame.localPosition; s.Join(target.DOLocalMoveX(localPosition.x + 100f, 0.15f).SetLoops(2, LoopType.Yoyo).SetId(this)); Sequence s2 = tweenCrashFlagShipsTween; Transform target2 = mTransform_TargetFlagShipFrame; Vector3 localPosition2 = mTransform_TargetFlagShipFrame.localPosition; s2.Join(target2.DOLocalMoveX(localPosition2.x - 100f, 0.15f).SetLoops(2, LoopType.Yoyo).SetId(this)); float friendHideLocalPositionX = -960 - mTexture_FriendFlagShip.width / 2; float targetHideLocalPositionX = 960 + mTexture_TargetFlagShip.width / 2; Sequence tweenCrashFlagShipOutTween = DOTween.Sequence().SetId(this); tweenCrashFlagShipOutTween.Join(mTransform_FriendFlagShipFrame.DOLocalMoveX(friendHideLocalPositionX, 1f).SetId(this)).SetEase(Ease.InQuart); tweenCrashFlagShipOutTween.Join(mTransform_TargetFlagShipFrame.DOLocalMoveX(targetHideLocalPositionX, 1f).SetId(this)).SetEase(Ease.InQuart); Sequence playAllSequence = DOTween.Sequence().SetId(this); playAllSequence.Append(tweenDeckInShipViewsSequence); playAllSequence.AppendInterval(1f); playAllSequence.Append(tweenCrashFlagShipsTween); playAllSequence.Append(tweenCrashFlagShipOutTween); playAllSequence.OnComplete(delegate { this.OnAnimationFinished(); }); yield return(playAllSequence.WaitForCompletion()); UnityEngine.Debug.Log("ProductionFinished:" + stopWatch.Elapsed.Milliseconds.ToString()); }
private void OnSelectedSceneListener(Generics.Scene selectedScene) { if (mStateManager.CurrentState != State.Menu) { return; } ChangeShipDepth(ShipDepth.Default); if (selectedScene != Generics.Scene.Option && selectedScene != Generics.Scene.Marriage && SingletonMonoBehaviour <UIPortFrame> .exist()) { SingletonMonoBehaviour <UIPortFrame> .Instance.ReqFrame(isScreenIn : false); } switch (selectedScene) { case Generics.Scene.Strategy: SingletonMonoBehaviour <FadeCamera> .Instance.FadeOut(0.3f, delegate { UnLoadUnUsedAssets(delegate { SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(Generics.Scene.Strategy); }); }); break; case Generics.Scene.Option: mStateManager.PushState(State.Option); break; case Generics.Scene.Marriage: mStateManager.PushState(State.MarriageConfirm); break; case Generics.Scene.SaveLoad: { Hashtable hashtable = new Hashtable(); hashtable.Add("rootType", Generics.Scene.Port); RetentionData.SetData(hashtable); SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene); break; } case Generics.Scene.Arsenal: if (mDeckModel.GetFlagShip().ShipType == 19) { mStateManager.PushState(State.ArsenalTypeSelect); } else { SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(selectedScene); } break; case Generics.Scene.Item: case Generics.Scene.Interior: case Generics.Scene.Album: SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene); break; default: if (PortObjectManager.isPrefabSecene(selectedScene)) { SingletonMonoBehaviour <PortObjectManager> .Instance.InstantiateScene(selectedScene); } else { SingletonMonoBehaviour <PortObjectManager> .Instance.SceneLoad(selectedScene); } break; } }
private bool isTettai(DeckModel deck) { return(deck.GetFlagShip() != null && deck.GetFlagShip().IsEscaped()); }