@ -0,0 +1,27 @@ | |||||
[Ll]ibrary/ | |||||
[Tt]emp/ | |||||
[Oo]bj/ | |||||
[Bb]uild/ | |||||
# Autogenerated VS/MD solution and project files | |||||
*.csproj | |||||
*.unityproj | |||||
*.sln | |||||
*.suo | |||||
*.tmp | |||||
*.user | |||||
*.userprefs | |||||
*.pidb | |||||
*.booproj | |||||
#Blender backup files | |||||
*.blend1 | |||||
*.blend2 | |||||
# Unity3D generated meta files | |||||
*.pidb.meta | |||||
# Unity3D Generated File On Crash Reports | |||||
sysinfo.txt | |||||
Unity_Projects/AirShip_Game/Assets/_Scenes/menu/LightingData.asset | |||||
Unity_Projects/AirShip_Game/Assets/_Scenes/menu/LightingData.asset.meta |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 3977a5e8e03b325478dd9380ec363908 | |||||
folderAsset: yes | |||||
timeCreated: 1458688821 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 3426ba420f94fbc4ca385f9506803cd3 | |||||
folderAsset: yes | |||||
timeCreated: 1458647092 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 03c16792e70cca44c8e410ca3535fb00 | |||||
folderAsset: yes | |||||
timeCreated: 1458688805 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,55 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class ConnecterOriginal : MonoBehaviour { | |||||
private ThrusterOriginal thruster; | |||||
private Rigidbody2D rigid; | |||||
private bool connected = false; | |||||
// Use this for initialization | |||||
void Start() { | |||||
thruster = GetComponent<ThrusterOriginal>(); | |||||
rigid = GetComponent<Rigidbody2D>(); | |||||
} | |||||
// Update is called once per frame | |||||
void Update() { | |||||
} | |||||
void OnCollisionEnter2D(Collision2D coll) { | |||||
if (coll.gameObject.tag == "Player" && !connected) { | |||||
connected = true; | |||||
Rigidbody2D collRigid = coll.rigidbody; | |||||
collRigid.mass += rigid.mass; | |||||
thruster.rigid = collRigid; | |||||
Destroy(rigid); | |||||
transform.parent = coll.transform; | |||||
Vector3 tempRot = transform.localEulerAngles; | |||||
tempRot.z = Mathf.Round(tempRot.z / 90) * 90; | |||||
transform.localRotation = Quaternion.Euler(tempRot); | |||||
Vector3 tempPos = transform.localPosition; | |||||
float scale = coll.gameObject.GetComponent<BoxCollider2D>().size.x; | |||||
tempPos.x = Mathf.Round(tempPos.x / scale) * scale; | |||||
tempPos.y = Mathf.Round(tempPos.y / scale) * scale; | |||||
transform.localPosition = tempPos; | |||||
Destroy(this); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 27180fea04ecf554ba4fbdadf9e2edf4 | |||||
timeCreated: 1458688872 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 5d7e8b34be0856b49b47d688a255b9a5 | |||||
timeCreated: 1458688640 | |||||
licenseType: Free | |||||
NativeFormatImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,33 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class ThrusterOriginal : MonoBehaviour { | |||||
public float speed; | |||||
private ParticleSystem particles; | |||||
[HideInInspector] | |||||
public Rigidbody2D rigid; | |||||
// Use this for initialization | |||||
void Start() { | |||||
rigid = GetComponent<Rigidbody2D>(); | |||||
particles = GetComponentInChildren<ParticleSystem>(); | |||||
particles.enableEmission = false; | |||||
} | |||||
// Update is called once per frame | |||||
void FixedUpdate() { | |||||
if (Input.anyKey) { | |||||
rigid.AddForceAtPosition(transform.right * speed, transform.position, ForceMode2D.Impulse); | |||||
particles.enableEmission = true; | |||||
} else { | |||||
particles.enableEmission = false; | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 5760ed2be97f356429b5d88752235e39 | |||||
timeCreated: 1458688495 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8555d667d4774b34d88aa06cf43c0378 | |||||
timeCreated: 1458688435 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c8d37cdfa8e95224baa80907c0a60d40 | |||||
folderAsset: yes | |||||
timeCreated: 1458647097 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 139c724080de4484dbb8b5166381e2f6 | |||||
timeCreated: 1458649078 | |||||
licenseType: Free | |||||
NativeFormatImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 96df8a3ffa6f2e343af8cc7937881b01 | |||||
folderAsset: yes | |||||
timeCreated: 1458647077 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,56 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class Connecter : MonoBehaviour { | |||||
private Thruster thruster; | |||||
private Rigidbody2D rigid; | |||||
private bool connected = false; | |||||
// Use this for initialization | |||||
void Start () { | |||||
thruster = GetComponent<Thruster>(); | |||||
rigid = GetComponent<Rigidbody2D>(); | |||||
} | |||||
// Update is called once per frame | |||||
void Update () { | |||||
} | |||||
void OnCollisionEnter2D(Collision2D coll) { | |||||
if (coll.gameObject.tag == "Player" && !connected) { | |||||
connected = true; | |||||
thruster.attached = true; | |||||
Rigidbody2D collRigid = coll.rigidbody; | |||||
collRigid.mass += rigid.mass; | |||||
thruster.rigid = collRigid; | |||||
Destroy(rigid); | |||||
transform.parent = coll.transform; | |||||
Vector3 tempRot = transform.localEulerAngles; | |||||
tempRot.z = Mathf.Round(tempRot.z / 90) * 90; | |||||
transform.localRotation = Quaternion.Euler(tempRot); | |||||
Vector3 tempPos = transform.localPosition; | |||||
float scale = coll.gameObject.GetComponent<BoxCollider2D>().size.x; | |||||
tempPos.x = Mathf.Round(tempPos.x / scale) * scale; | |||||
tempPos.y = Mathf.Round(tempPos.y / scale) * scale; | |||||
transform.localPosition = tempPos; | |||||
Destroy(this); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 09a54f990f19c894db43fcdf4e23915e | |||||
timeCreated: 1458650258 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,38 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class DebrisController : MonoBehaviour { | |||||
public int count; | |||||
public GameObject debris; | |||||
public Transform minPos; | |||||
public Transform maxPos; | |||||
// Use this for initialization | |||||
void Start () { | |||||
for (int i = 0; i < count; i++) { | |||||
Vector2 randPos = Vector2.zero; | |||||
randPos.x = Random.Range(Mathf.Min(minPos.position.x, maxPos.position.x), Mathf.Max(minPos.position.x, maxPos.position.x)); | |||||
randPos.y = Random.Range(Mathf.Min(minPos.position.y, maxPos.position.y), Mathf.Max(minPos.position.y, maxPos.position.y)); | |||||
Vector3 randRot = Vector3.zero; | |||||
randRot.z = Random.Range(0, 360); | |||||
GameObject temp = (GameObject) Instantiate(debris, randPos, Quaternion.Euler(randRot)); | |||||
temp.transform.localScale = Vector3.one * 3; | |||||
temp.transform.parent = transform; | |||||
Rigidbody2D rigid = temp.GetComponent<Rigidbody2D>(); | |||||
rigid.AddTorque(Random.Range(3f, 5f)); | |||||
} | |||||
} | |||||
// Update is called once per frame | |||||
void Update () { | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: b5725b85416ee2e4582d4ab44b32250f | |||||
timeCreated: 1458649837 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,60 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class Thruster : MonoBehaviour { | |||||
public float speed; | |||||
public float thrustDuration; | |||||
public bool shot = false; | |||||
public bool attached = false; | |||||
private ParticleSystem particles; | |||||
[HideInInspector] | |||||
public Rigidbody2D rigid; | |||||
// Use this for initialization | |||||
void Start () { | |||||
rigid = GetComponent<Rigidbody2D>(); | |||||
particles = GetComponentInChildren<ParticleSystem>(); | |||||
particles.enableEmission = false; | |||||
} | |||||
// Update is called once per frame | |||||
void FixedUpdate () { | |||||
if (Input.anyKeyDown && attached) { | |||||
StartCoroutine(fireEngines()); | |||||
} | |||||
/* | |||||
rigid.AddForceAtPosition(transform.right * speed, transform.position, ForceMode2D.Impulse); | |||||
particles.enableEmission = true; | |||||
shot = true; | |||||
} else if (shot) { | |||||
Destroy(gameObject); | |||||
} else { | |||||
particles.enableEmission = false; | |||||
} | |||||
*/ | |||||
} | |||||
private IEnumerator fireEngines() { | |||||
Debug.Log("firing Engines"); | |||||
float startTime = Time.time; | |||||
particles.enableEmission = true; | |||||
while (Time.time - startTime < thrustDuration) { | |||||
rigid.AddForceAtPosition(transform.right * speed, transform.position, ForceMode2D.Impulse); | |||||
yield return new WaitForSeconds(0.01f); | |||||
} | |||||
Destroy(gameObject); | |||||
yield return null; | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 49ee928b47e58ca4facb77d80a15f6d4 | |||||
timeCreated: 1458648321 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,21 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class centerOfMass : MonoBehaviour { | |||||
public GameObject marker; | |||||
public Rigidbody2D rigid; | |||||
// Use this for initialization | |||||
void Start () { | |||||
} | |||||
// Update is called once per frame | |||||
void Update () { | |||||
Vector3 temp = rigid.worldCenterOfMass; | |||||
temp.z-= 0.2f; | |||||
marker.transform.position = temp; | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: f9e700e5521270442a8098e3dd18110e | |||||
timeCreated: 1458652726 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,21 @@ | |||||
using UnityEngine; | |||||
using System.Collections; | |||||
public class playerController : MonoBehaviour { | |||||
public float startingRotation; | |||||
public float minSpeed; | |||||
private Rigidbody2D rigid; | |||||
// Use this for initialization | |||||
void Start () { | |||||
rigid = GetComponent<Rigidbody2D>(); | |||||
rigid.AddTorque(startingRotation); | |||||
} | |||||
// Update is called once per frame | |||||
void FixedUpdate () { | |||||
} | |||||
} |
@ -0,0 +1,12 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 0cae769e2b517844686c1debf3321dc5 | |||||
timeCreated: 1458687089 | |||||
licenseType: Free | |||||
MonoImporter: | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: aeffc64116d43c94ab692a3ba425e7b9 | |||||
folderAsset: yes | |||||
timeCreated: 1458647086 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: aad2217d76cf6094b921a002251b8d90 | |||||
timeCreated: 1458650093 | |||||
licenseType: Free | |||||
NativeFormatImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,9 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 8492a128e31ae834c939a77b96a13b1d | |||||
folderAsset: yes | |||||
timeCreated: 1458647072 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 4722d74a92e6ec84ba62ff842b22809c | |||||
timeCreated: 1458647122 | |||||
licenseType: Free | |||||
DefaultImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||||
fileFormatVersion: 2 | |||||
guid: a7d17c5d3d85e61498a0e69aa3b00e30 | |||||
timeCreated: 1458654797 | |||||
licenseType: Free | |||||
NativeFormatImporter: | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,2 @@ | |||||
m_EditorVersion: 5.3.2f1 | |||||
m_StandardAssetsVersion: 0 |