Github Account:
https://github.com/HoloApolloX/ApolloX/
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
ApolloX projectfileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} | |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} | |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
ApolloX projectfileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} | |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} | |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
ApolloX projectfileFormatVersion: 2 | |
guid: 104c16ddd4552424bba1db379a6ece52 | |
timeCreated: 1539004827 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using UnityEngine; | |
using UnityEngine.XR.WSA.Input; | |
public class GazeGestureManager : MonoBehaviour { | |
public static GazeGestureManager Instance { get; private set; } | |
public GameObject FocusedObject { get; private set; } | |
public GestureRecognizer recognizer; | |
private bool updateFocusedObject = true; | |
void Awake() | |
{ | |
Instance = this; | |
recognizer = new GestureRecognizer(); | |
recognizer.TappedEvent += (source, tapCount, ray) => | |
{ | |
if (FocusedObject != null) | |
{ | |
updateFocusedObject = true; | |
FocusedObject.SendMessageUpwards("OnSelect"); | |
} | |
}; | |
recognizer.StartCapturingGestures(); | |
} | |
void Update() | |
{ | |
GameObject oldFocusObject = FocusedObject; | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
FocusedObject = hitInfo.collider.gameObject; | |
} | |
else | |
{ | |
FocusedObject = null; | |
} | |
if (FocusedObject != oldFocusObject) | |
{ | |
recognizer.CancelGestures(); | |
recognizer.StartCapturingGestures(); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0db682c22eee33045b57e9a8e4f39358 | |
timeCreated: 1539510812 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class GlobalCursor : MonoBehaviour { | |
private MeshRenderer meshRenderer; | |
void Start() | |
{ | |
meshRenderer = this.gameObject.GetComponentInChildren<MeshRenderer>(); | |
} | |
void Update() | |
{ | |
var headPosition = Camera.main.transform.position; | |
var gazeDirection = Camera.main.transform.forward; | |
RaycastHit hitInfo; | |
if (Physics.Raycast(headPosition, gazeDirection, out hitInfo)) | |
{ | |
meshRenderer.enabled = true; | |
this.transform.position = hitInfo.point; | |
this.transform.rotation = Quaternion.FromToRotation(Vector3.up, hitInfo.normal); | |
} | |
else | |
{ | |
meshRenderer.enabled = false; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: d3be2aa77384c9642ae02a94d484a479 | |
timeCreated: 1539509591 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class LaunchManager : MonoBehaviour { | |
public static LaunchManager Instance { get; private set; } | |
public GameObject saturn; | |
public ParticleSystem particleSystem; | |
public static bool has_Started = true; | |
public bool is_Partic_Enabled = true; | |
float exp = 0.001f; | |
// Use this for initialization | |
void Start () { | |
particleSystem.Stop(); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void StartApollo() | |
{ | |
has_Started = false; | |
} | |
// Update is called once per frame | |
void Update () { | |
if (!has_Started) | |
{ | |
exp += 0.0002f; | |
transform.position = new Vector3(transform.position.x, transform.position.y + exp, transform.position.z); | |
if (is_Partic_Enabled) | |
{ | |
particleSystem.Play(); | |
is_Partic_Enabled = false; | |
} | |
} | |
if (saturn.transform.position.y > 35) | |
{ | |
SceneManager.LoadScene("MoonLandingScene"); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 877d9c9b15d9f1143b71a9f3a907e55a | |
timeCreated: 1539423837 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 2179917d658f7214ab761e2b4ed996f7 | |
folderAsset: yes | |
timeCreated: 1538866223 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 8bb285bd0d7d27f4f83f6ae5aa859b0c | |
folderAsset: yes | |
timeCreated: 1538865829 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoonExplorationManager : MonoBehaviour { | |
public static MoonExplorationManager Instance { get; private set; } | |
public GameObject bootPrintGB; | |
public GameObject leafGB; | |
public GameObject SiliconDiskGB; | |
public GameObject StickerGB; | |
public GameObject FlagGB; | |
public GameObject SSEPGB; | |
public GameObject LRRGB; | |
public GameObject PlaqueGB; | |
public AudioClip audioClipBreath; | |
public AudioSource audioSourceBreath; | |
public GameObject scoreText; | |
public static float collected = 0.0f; | |
public static int state = 0; | |
void Start() { | |
//bootPrintGB.SetActive(false); | |
//leafGB.SetActive(false); | |
//SiliconDiskGB.SetActive(false); | |
//StickerGB.SetActive(false); | |
//FlagGB.SetActive(false); | |
//SSEPGB.SetActive(false); | |
//LRRGB.SetActive(false); | |
//PlaqueGB.SetActive(false); | |
audioSourceBreath.PlayOneShot(audioClipBreath); | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
void Update() { | |
//Debug.Log(state); | |
if (collected == 25.0f) | |
scoreText.GetComponent<TextMesh>().text = string.Format("25.1 kg {0}Congratulations!{0}You can go home {0}now.", Environment.NewLine); | |
else | |
scoreText.GetComponent<TextMesh>().text = string.Format("Collected: {0} kg", collected); | |
//if ((int)State.BootPrint == state) | |
//{ | |
// bootPrintGB.SetActive(true); | |
//} | |
//else if ((int)State.Flag == state) | |
//{ | |
// FlagGB.SetActive(true); | |
//} | |
//else if ((int)State.SecondAstronaut == state) | |
//{ | |
//} | |
//else if ((int)State.DropOff1 == state) | |
//{ | |
// leafGB.SetActive(true); | |
//} | |
//else if ((int)State.DropOff2 == state) | |
//{ | |
// SiliconDiskGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff3 == state) | |
//{ | |
// SSEPGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff4 == state) | |
//{ | |
// LRRGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff5 == state) | |
//{ | |
// PlaqueGB.SetActive(false); | |
//} | |
//else if ((int)State.DropOff6 == state) | |
//{ | |
// StickerGB.SetActive(false); | |
//} | |
//else if ((int)State.CollectRocks == state) | |
//{ | |
//} | |
} | |
public static void ChangeState() | |
{ | |
state = state + 1; | |
} | |
public static void CollectRocks() | |
{ | |
collected = collected + 2.5f; | |
} | |
private enum State {Initial, BootPrint, Flag, SecondAstronaut, DropOff1, DropOff2, DropOff3, DropOff4, DropOff5, DropOff6, CollectRocks }; | |
} | |
fileFormatVersion: 2 | |
guid: 24d5b18b2f9029e4da5a4e5f528ce5d4 | |
timeCreated: 1539506900 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class MoonLandingManager : MonoBehaviour { | |
public static MoonLandingManager Instance { get; private set; } | |
public GameObject lunar; | |
public GameObject lunarLight; | |
float timeLeft = 15.0f; | |
// Use this for initialization | |
void Start () { | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
public static void ChangeScene() | |
{ | |
SceneManager.LoadScene(2); | |
} | |
// Update is called once per frame | |
void Update () { | |
if (lunar.transform.position.y >= 160) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.3f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 160 && lunar.transform.position.y >= 150) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.1f, lunar.transform.position.z); | |
} | |
else if (lunar.transform.position.y < 150 && lunar.transform.position.y >= 138) | |
{ | |
lunar.transform.position = new Vector3(lunar.transform.position.x, lunar.transform.position.y - 0.05f, lunar.transform.position.z); | |
} | |
lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 2, lunarLight.transform.rotation.z); | |
timeLeft -= Time.deltaTime; | |
if (timeLeft < 0) | |
{ | |
SceneManager.LoadScene("MoonExplorationScene"); | |
timeLeft = 10000; | |
//lunarLight.transform.Rotate(lunarLight.transform.rotation.x, lunarLight.transform.rotation.y + 40, lunarLight.transform.rotation.z); | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: cb8317ee37ff52445a545d2941706b45 | |
timeCreated: 1539437206 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class ArrowBehavior : MonoBehaviour { | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.Rotate(gameObject.transform.rotation.y + 0.8f, 0 , 0); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 5b6fcc9555043cf499a7cbbe33e1ae59 | |
timeCreated: 1539514094 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
fileFormatVersion: 2 | |
guid: 10f258a6aaf67b24095202e506397651 | |
folderAsset: yes | |
timeCreated: 1539426956 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AudienceMovement : MonoBehaviour | |
{ | |
public float maxSize; | |
public float growFactor; | |
public float waitTime; | |
public float maxRotation; | |
public Vector3 from = new Vector3(0f, 0f, -1.8f); | |
public Vector3 to = new Vector3(0f, 0f, 1.8f); | |
public float speed = 0.1f; | |
void Start() | |
{ | |
StartCoroutine(Scale()); | |
} | |
void Update() | |
{ | |
//float t = Mathf.PingPong(Time.time * speed * 2.0f, 1.0f); | |
float t = (Mathf.Sin(Time.time * speed * Mathf.PI * 2.0f) + 1.0f) / 2.0f; | |
transform.eulerAngles = Vector3.Lerp(from, to, t); | |
} | |
IEnumerator Scale() | |
{ | |
float timer = 0; | |
while (true) | |
{ | |
// we scale all axis, so they will have the same value, | |
// so we can work with a float instead of comparing vectors | |
while (maxSize > transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale += new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
/* IEnumerator Rotate() | |
{ | |
float timer = 0; | |
Vector3 newRotationAngles = transform.rotation.eulerAngles; | |
while (true) | |
{ | |
while (maxRotation > transform.localRotation.z) | |
{ | |
timer += Time.deltaTime; | |
//transform.rotation.z += Quaternion.Euler(0, 0, 0.1f); //* Time.deltaTime * growFactor; | |
newRotationAngles.z += 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
// reset the timer | |
yield return new WaitForSeconds(waitTime); | |
timer = 0; | |
while (1 < transform.localScale.x) | |
{ | |
timer += Time.deltaTime; | |
//transform.localScale -= new Vector3(1, 1, 1) * Time.deltaTime * growFactor; | |
newRotationAngles.z -= 50; | |
transform.rotation = Quaternion.Euler(newRotationAngles); | |
yield return null; | |
} | |
timer = 0; | |
yield return new WaitForSeconds(waitTime); | |
} | |
} | |
*/ | |
} | |
fileFormatVersion: 2 | |
guid: 512451a2757dc7b48a944cd757f3d0b1 | |
timeCreated: 1539427396 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class CupolaOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("CupolaScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 0df26a94f33f2244db7470608123e062 | |
timeCreated: 1539344138 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class DestinyOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
SceneManager.LoadScene("DestinyScene"); | |
} | |
} | |
fileFormatVersion: 2 | |
guid: 6d575f770038e30439ee69ede5a1efbb | |
timeCreated: 1539344683 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class EarthRotation : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} | |
// Update is called once per frame | |
void Update () { | |
gameObject.transform.eulerAngles = new Vector3( | |
gameObject.transform.eulerAngles.x, | |
gameObject.transform.eulerAngles.y + 0.05f, | |
gameObject.transform.eulerAngles.z); | |
} | |
} |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextMoonOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonLandingManager.ChangeScene(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: f6f2fac8bded00e44a2a7d9e7c5e5718 | |
timeCreated: 1539521211 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class NextOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
MoonExplorationManager.ChangeState(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 3a99dd292a33a2146b3db782bd721b3b | |
timeCreated: 1539515856 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class OutsideOnClick : MonoBehaviour { | |
void OnSelect() | |
{ | |
//SceneManager.LoadScene("OutsideScene"); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 65cc8aafd13b0ed4f816691f05264010 | |
timeCreated: 1539344621 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 45e836f7d7364dc42879007bca624c62 | |
folderAsset: yes | |
timeCreated: 1539504094 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class RocksOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
gameObject.SetActive(false); | |
MoonExplorationManager.CollectRocks(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: aca9fbbdb8250b64f845162d4b2e7d47 | |
timeCreated: 1539506689 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 7ff670a48eef496438121e2d466fd1be | |
folderAsset: yes | |
timeCreated: 1538865593 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: 32d878a9c9c60cd429178b00663cb6f9 | |
folderAsset: yes | |
timeCreated: 1538865611 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceFloat : MonoBehaviour | |
{ | |
//rotation | |
GameObject cube; | |
public Transform center; | |
public Vector3 axis = Vector3.up; | |
public float rotationSpeed = 30.0f; | |
//movement | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
cube = GameObject.FindWithTag("AstronautEscapeSuit"); | |
center = cube.transform; | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
transform.RotateAround(center.position, axis, rotationSpeed * Time.deltaTime); | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 67799d918c6b3244f98fa85c66280740 | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceManager : MonoBehaviour { | |
public static SpaceManager Instance { get; private set; } | |
void Start() | |
{ | |
} | |
void Awake() | |
{ | |
Instance = this; | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} |
fileFormatVersion: 2 | |
guid: 04239d1f61184c843880e259443e2cd2 | |
timeCreated: 1539343901 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class SpaceMove : MonoBehaviour | |
{ | |
public Vector3[] positions; | |
public Transform ObjectToMove; | |
public float MoveSpeed = 8; | |
Coroutine MoveIE; | |
void Start() | |
{ | |
StartCoroutine(moveObject()); | |
} | |
void Update() | |
{ | |
} | |
IEnumerator moveObject() | |
{ | |
for (int i = 0; i < positions.Length; i++) | |
{ | |
MoveIE = StartCoroutine(Moving(i)); | |
yield return MoveIE; | |
} | |
} | |
IEnumerator Moving(int currentPosition) | |
{ | |
while (ObjectToMove.transform.position != positions[currentPosition]) | |
{ | |
ObjectToMove.transform.position = Vector3.MoveTowards(ObjectToMove.transform.position, positions[currentPosition], MoveSpeed * Time.deltaTime); | |
yield return null; | |
} | |
} | |
} |
fileFormatVersion: 2 | |
guid: 53adcdd951827c243a487bd73fd353dd | |
timeCreated: 1539340732 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.SceneManagement; | |
public class StartApolloOnSelect : MonoBehaviour { | |
void OnSelect() | |
{ | |
LaunchManager.StartApollo(); | |
} | |
} |
fileFormatVersion: 2 | |
guid: 0b3fd7ffb19aca542a7eb03edc42bdfd | |
timeCreated: 1539424974 | |
licenseType: Free | |
MonoImporter: | |
externalObjects: {} | |
serializedVersion: 2 | |
defaultReferences: [] | |
executionOrder: 0 | |
icon: {instanceID: 0} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
fileFormatVersion: 2 | |
guid: cffad3d5cdb239a4bad37d07e8f88601 | |
folderAsset: yes | |
timeCreated: 1538867690 | |
licenseType: Free | |
DefaultImporter: | |
externalObjects: {} | |
userData: | |
assetBundleName: | |
assetBundleVariant: |
SpaceApps is a NASA incubator innovation program.