Ejemplo n.º 1
0
	public void Trigger(AnimateToPoint devilHandAnimator1,
						AnimateToPoint devilHandAnimator2,
						AnimateToPoint victimAnimator,
						Vector3 podiumPos,
						Action onComplete) {

		devilHandAnimator1.gameObject.SetActive(true);
		devilHandAnimator2.gameObject.SetActive(true);
		devilHandAnimator1.transform.position = OffscreenPos - HandSpacing;
		devilHandAnimator2.transform.position = OffscreenPos + HandSpacing;
		victimAnimator.transform.position = podiumPos;

		devilHandAnimator1.Trigger(TweenDevilHandOn, podiumPos - HandSpacing);
		devilHandAnimator2.Trigger(TweenDevilHandOn, podiumPos + HandSpacing, () => {
			devilHandAnimator1.Trigger(TweenDevilHandClose, podiumPos);
			devilHandAnimator2.Trigger(TweenDevilHandClose, podiumPos, () => {
				ScreenShaker.Instance.ApplyShake(ScreenShakeForce);
				victimAnimator.Trigger(TweenDevilHandOff, OffscreenPos);
				devilHandAnimator1.Trigger(TweenDevilHandOff, OffscreenPos);
				devilHandAnimator2.Trigger(TweenDevilHandOff, OffscreenPos, () => {
					devilHandAnimator1.gameObject.SetActive(false);
					devilHandAnimator2.gameObject.SetActive(false);
					victimAnimator.gameObject.SetActive(false);
					onComplete();
				});
			});
		});
	}
Ejemplo n.º 2
0
	public void Trigger(AnimateToPoint victimAnimator,
		Vector3 startPos,
		Vector3 queuePos,
		Action onComplete) {

		victimAnimator.transform.position = startPos;

		victimAnimator.Trigger(TweenToQueue, queuePos, () => {
			onComplete();
		});
	}
Ejemplo n.º 3
0
	public void Trigger(AnimateToPoint openAnimator,
						AnimateToPoint closedAnimator,
						AnimateToPoint victimAnimator,
						Transform sadRoot,
						Transform happyRoot,
						Transform ecstaticRoot,
						Vector3 podiumPos,
						Vector3 choirPos,
						Action onComplete) {

		sadRoot.gameObject.SetActive(false);
		happyRoot.gameObject.SetActive(true);
		openAnimator.gameObject.SetActive(true);
		closedAnimator.gameObject.SetActive(false);

		openAnimator.transform.position = OffscreenPos;
		victimAnimator.transform.position = podiumPos;

		openAnimator.Trigger(TweenGodHandOn, podiumPos, () => {
			openAnimator.gameObject.SetActive(false);
			closedAnimator.gameObject.SetActive(true);
			happyRoot.gameObject.SetActive(false);
			ecstaticRoot.gameObject.SetActive(true);

			closedAnimator.transform.position = openAnimator.transform.position;

			victimAnimator.Trigger(TweenToChoir, choirPos);
			closedAnimator.Trigger(TweenToChoir, choirPos, () => {
				closedAnimator.Trigger(TweenGodHandOff, OffscreenPos, () => {
					closedAnimator.gameObject.SetActive(false);
					happyRoot.gameObject.SetActive(true);
					ecstaticRoot.gameObject.SetActive(false);

					onComplete();
				});
			});
		});
	}
Ejemplo n.º 4
0
	public void Trigger(AnimateToPoint victimAnimator,
		ParticleSystem poofCloud,
		GameObject bigDemonRoot,
		Transform demonRoot,
		Transform sadRoot,
		Vector3 startPos,
		Vector3 podiumPos,
		Action onComplete) {

		demonRoot.gameObject.SetActive(false);
		victimAnimator.transform.position = startPos;
		poofCloud.Play();
		ScreenShaker.Instance.ApplyShake(ShakeForce);

		victimAnimator.Trigger(TweenToQueue, podiumPos, () => {
			poofCloud.Play();
			ScreenShaker.Instance.ApplyShake(ShakeForce);
			bigDemonRoot.SetActive(true);
			sadRoot.gameObject.SetActive(true);
			onComplete();
		});
	}