1 using System.Collections;
2 using System.Collections.Generic;
12 public GameObject cameraBoom;
13 public float spinRate = 1f;
15 public Text slideLabel;
17 private float nextSlideTime;
19 private int currentSlide = 0;
21 private List<ChaosEqn> eqns;
22 private string[] eqnNames;
27 private Quaternion initialRotation;
31 nextSlideTime = Time.time +
timer;
33 maxSlide = eqns.Count;
34 eqnNames =
new string[maxSlide];
37 eqnNames[index] = eqn.
GetName();
40 chaoticMotion = GetComponent<ChaoticMotion>();
42 chaoticMotion.
timeZoom = eqns[currentSlide].GetSlideshowSpeed();
43 slideLabel.text = eqnNames[currentSlide];
46 chaosTrail = GetComponentInChildren<ChaosTrail>();
48 initialRotation = transform.rotation;
54 if (Time.time > nextSlideTime) {
55 nextSlideTime = Time.time +
timer;
59 if (Time.time < (nextSlideTime - timer/2f)) {
60 cameraBoom.transform.rotation *= Quaternion.AngleAxis( spinRate, Vector3.up);
62 cameraBoom.transform.rotation *= Quaternion.AngleAxis( spinRate, Vector3.right);
67 if (Input.GetKeyUp(KeyCode.N)) {
69 }
else if (Input.GetKeyUp(KeyCode.P)) {
75 private void NextSlide(
bool advance) {
78 if (currentSlide >= maxSlide) {
83 if (currentSlide < 0) {
84 currentSlide = maxSlide-1;
87 Debug.Log(eqnNames[currentSlide]);
89 slideLabel.text = eqnNames[currentSlide];
91 transform.position = Vector3.zero;
92 cameraBoom.transform.rotation = initialRotation;
93 chaoticMotion.
timeZoom = eqns[currentSlide].GetSlideshowSpeed();
95 if (chaosTrail != null) {
int selectedEqn
Number of chaos system to evolve (w.r.t. ChaosFactory list)
Chaos trail. Update a trail using a LineRenderer. This allows the path between points to be filled in...
float timeZoom
Time scale (>0)
int timer
Time interval to show each system for.
Chaos eqn. Base class for all equations that define a 3D chaotic system.
static List< ChaosEqn > GetEquations()
Returns a List of Equation objects. A singleton reference list is provided for the inspector script t...
Chaotic motion. Evolve the user specified chaotic system with the parameters held by the ChaoticSyste...
override void Init()
Init the equation using the selected equation and parameter bundle.
string GetName()
Gets the name.