private void AnimationCompleted(object sender, AnimationEventArgs eventArguments) { if (OnAnimationComplete != null) { OnAnimationComplete.Invoke(sender, eventArguments); } }
public void OnHolocronEnterAnimationComplete(object sender, AnimationEventArgs eventArgs) { if (string.Equals(eventArgs.AnimationName, HolocronEnterAnimationComplete)) { FtueTooltip.transform.position = HolocronContainer.transform.position - (Vector3.up * 0.125f); FtueTooltip.SetActive(true); // removing listener HolocronAnimations.OnAnimationComplete -= OnHolocronEnterAnimationComplete; } }
private void OnCraitAnimationEventHandler(object sender, AnimationEventArgs eventArgs) { string eventType = eventArgs.AnimationName; if (string.Equals(eventType, "startIntroBonusPlanet")) { BonusPlanetUnlockFX.SetActive(true); RotationController.SetTargetRotation(-120f); } if (string.Equals(eventType, "startExitBonusPlanet")) { RotationController.SetTargetRotation(0f); craitAnimationEvents.OnAnimationComplete -= OnCraitAnimationEventHandler; } }
private void AnimationComplete(object sender, AnimationEventArgs eventArgs) { lastNode.OnAnimationComplete -= AnimationComplete; selectedNode.OnAnimationComplete -= AnimationComplete; // Reattach after animations if (selectedNode.NodeType == MenuNodeType.Galaxy && lastNode.NodeType == MenuNodeType.Planet) { lastNode.GetRootTransform().SetParent(lastNodeParent, true); } // displaying holocron effects (if needed) for (int i = 0; i < HolocronFX.transform.childCount; i++) { Transform child = HolocronFX.transform.GetChild(i); if (!child.gameObject.activeSelf) { child.gameObject.SetActive(true); } } Animating = false; }
protected void OnAnimationComplete(object sender, AnimationEventArgs eventArgs) { if (eventArgs != null) { if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronAppears)) { // TODO: mathh010 - get audio event to play or remove (Audio - playing Holocron appears event) } if (string.Equals(eventArgs.AnimationName, AnimationEventName.GalaxyMapTurnsOn)) { // Audio - playing galaxy map appears event AudioEvent.Play(AudioEventName.GalaxyMap.IntroMusic, Galaxy); AudioEvent.Play(AudioEventName.GalaxyMap.Appears, Galaxy); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronAllSpinIdleStart)) { // Audio - playing Holocron all spin idle event AudioEvent.Play(AudioEventName.Holocron.AllSpinIdle, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronAllSpinIntroStart)) { // Audio - playing Holocron all spin intro event AudioEvent.Play(AudioEventName.Holocron.AllSpinIntro, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronClosedIdleStart)) { // Audio - playing Holocron closed idle event AudioEvent.Play(AudioEventName.Holocron.ClosedIdle, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerExpandStart)) { // Audio - playing Holocron corner expand event AudioEvent.Play(AudioEventName.Holocron.CornerExpand, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerExpandIdleStart)) { // Audio - playing Holocron corner expand idle event AudioEvent.Play(AudioEventName.Holocron.CornerExpandIdle, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerReturnStart)) { // Audio - playing Holocron corner return event AudioEvent.Play(AudioEventName.Holocron.CornerReturn, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerSpinStopStart)) { // Audio - playing Holocron corner spin stop event AudioEvent.Play(AudioEventName.Holocron.CornerSpinStop, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerStopIdleStart)) { // Audio - playing Holocron corner stop idle event AudioEvent.Play(AudioEventName.Holocron.CornerStopIdle, Holocron); } if (string.Equals(eventArgs.AnimationName, AnimationEventName.HolocronCornerTurnStart)) { // Audio - playing Holocron corner turn event AudioEvent.Play(AudioEventName.Holocron.CornerTurn, Holocron); } } }
protected void OnAnimationComplete(object sender, AnimationEventArgs eventArgs) { allowGaze = (eventArgs.AnimationName == AnimationEventName.HolocronMasteryMenuIntro); }
protected void OnAnimationCompleteHandler(object sender, AnimationEventArgs eventArgs) { // hiding title screen TitleController.gameObject.SetActive(false); }
private void AnimationComplete(object sender, AnimationEventArgs eventArgs) { if (eventArgs.AnimationName.Equals("planet_primaryToRest")) { NavigationController.IsWaitingForAnimationToComplete = false; } if (DeepLinkOnLoad) { if (!isWaitingForPillarsForDeepLinkOnLoadAction) { isWaitingForPillarsForDeepLinkOnLoadAction = true; StartCoroutine(CheckUntilPillarsForDeepLinkOnLoad()); } return; } // galaxy animation completed if (eventArgs.AnimationName.Equals("GalaxyMapTurnsOn")) { ContainerAPI container = new ContainerAPI(Game.ForceVision); // checking if player has defeated Grand Inquisitor bool hasDefeatedGrandInquisitor = ContainerAPI.GetDuelApi().Progress.HasCompleted(SG.Lonestar.DuelAPI.Duelist.GrandInquisitor, 1); // checking if Crait unlock animation has played already bool hasCraitUnlockAnimationPlayed = container.PlayerPrefs.PrefKeyExists(Constants.CraitUnlocked); if (hasDefeatedGrandInquisitor && !hasCraitUnlockAnimationPlayed) { // checking for player rank JediRank playerRank = ContainerAPI.GetJediRank(); if (playerRank <= JediRank.Padawan) { AudioEvent.Play(AudioEventName.GalaxyMap.UnlockCraitNewUser, Holocron, (object in_cookie, AkCallbackType in_type, object in_info) => { PlayCraitUnlockAnimation(); }); } else { // playing unlock animation PlayCraitUnlockAnimation(); } // setting player pref that Crait unlock animation has played container.PlayerPrefs.SetPrefInt(Constants.CraitUnlocked, 1); } // checking if player has completed Crait content bool hasDefeatedPraetorianGuards = ContainerAPI.GetDuelApi().Progress.HasCompleted(SG.Lonestar.DuelAPI.Duelist.PraetorianGuards, 1); bool hasCompletedTowerDefense = BSG.SWARTD.TDAPI.GetInstance().HasWonBattle(BSG.SWARTD.TDAPI.Battles.Crait_3); bool hasPorgUnlockAnimationPlayed = container.PlayerPrefs.PrefKeyExists(Constants.PorgUnlocked); if (hasDefeatedPraetorianGuards && hasCompletedTowerDefense && !hasPorgUnlockAnimationPlayed) { // disabling user input on node selection Animating = true; DG.Tweening.DOVirtual.DelayedCall(3f, () => { MenuAudioController.DidAutoSelectNode = true; NodeSelected(CraitPlanetNode); pillars.PorgUnlockFX.SetActive(true); // enabling user input on node selection Animating = false; }); // saving player prefs for porg unlocking container.PlayerPrefs.SetPrefInt(Constants.PorgUnlocked, 1); } } lastNode.OnAnimationComplete -= AnimationComplete; selectedNode.OnAnimationComplete -= AnimationComplete; // Reattach after animations if (selectedNode.NodeType == MenuNodeType.Galaxy && lastNode.NodeType == MenuNodeType.Planet) { lastNode.GetRootTransform().SetParent(lastNodeParent, true); } // displaying holocron effects (if needed) for (int i = 0; i < HolocronFX.transform.childCount; i++) { Transform child = HolocronFX.transform.GetChild(i); if (!child.gameObject.activeSelf) { child.gameObject.SetActive(true); } } Animating = false; }