private IEnumerator CoAnimateNPC() { var go = Game.Game.instance.Stage.npcFactory.Create( NPCId, npcPosition.position, LayerType.UI, 31); _npc = go.GetComponent <NPC>(); _npc.SpineController.Appear(.3f); ShowButton(); var pos = ActionCamera.instance.Cam.transform.position; _sparkVFX = VFXController.instance.CreateAndChaseCam <CombinationSparkVFX>(pos); _npc.PlayAnimation(NPCAnimation.Type.Appear_02); yield return(new WaitForSeconds(1f)); _fireVFX = VFXController.instance.CreateAndChaseCam <CombinationBGFireVFX>(pos, new Vector3(-.7f, -.35f)); speechBubble.SetKey("SPEECH_COMBINATION_START_"); StartCoroutine(speechBubble.CoShowText(true)); StartCoroutine(CoWorkshopItemMove()); var format = L10nManager.Localize("UI_PRESS_TO_CONTINUE_FORMAT"); for (int timer = ContinueTime; timer >= 0; --timer) { continueText.text = string.Format(format, timer); yield return(_waitForOneSec); } StartCoroutine(CoDisappearNPC()); }
public override void Close(bool ignoreCloseAnimation = false) { if (!(_npc is null)) { _npc.gameObject.SetActive(false); } if (_sparkVFX) { _sparkVFX.Stop(); _sparkVFX = null; } if (_fireVFX) { _fireVFX.Stop(); _fireVFX = null; } Find <BottomMenu>().combinationButton.SetSortOrderToNormal(); base.Close(ignoreCloseAnimation); }