Browse Source

first two prototypes

master
Joshua Reason 8 years ago
commit
82d658ae20
51 changed files with 508 additions and 0 deletions
  1. +27
    -0
      .gitignore
  2. +9
    -0
      OneButtonGame/Assets/Materials.meta
  3. +9
    -0
      OneButtonGame/Assets/Music.meta
  4. +9
    -0
      OneButtonGame/Assets/Original.meta
  5. +55
    -0
      OneButtonGame/Assets/Original/ConnecterOriginal.cs
  6. +12
    -0
      OneButtonGame/Assets/Original/ConnecterOriginal.cs.meta
  7. BIN
      OneButtonGame/Assets/Original/DebrisOriginal.prefab
  8. +8
    -0
      OneButtonGame/Assets/Original/DebrisOriginal.prefab.meta
  9. +33
    -0
      OneButtonGame/Assets/Original/ThrusterOriginal.cs
  10. +12
    -0
      OneButtonGame/Assets/Original/ThrusterOriginal.cs.meta
  11. BIN
      OneButtonGame/Assets/Original/_TestScene - Copy.unity
  12. +8
    -0
      OneButtonGame/Assets/Original/_TestScene - Copy.unity.meta
  13. +9
    -0
      OneButtonGame/Assets/Prefabs.meta
  14. BIN
      OneButtonGame/Assets/Prefabs/Debris.prefab
  15. +8
    -0
      OneButtonGame/Assets/Prefabs/Debris.prefab.meta
  16. +9
    -0
      OneButtonGame/Assets/Scripts.meta
  17. +56
    -0
      OneButtonGame/Assets/Scripts/Connecter.cs
  18. +12
    -0
      OneButtonGame/Assets/Scripts/Connecter.cs.meta
  19. +38
    -0
      OneButtonGame/Assets/Scripts/DebrisController.cs
  20. +12
    -0
      OneButtonGame/Assets/Scripts/DebrisController.cs.meta
  21. +60
    -0
      OneButtonGame/Assets/Scripts/Thruster.cs
  22. +12
    -0
      OneButtonGame/Assets/Scripts/Thruster.cs.meta
  23. +21
    -0
      OneButtonGame/Assets/Scripts/centerOfMass.cs
  24. +12
    -0
      OneButtonGame/Assets/Scripts/centerOfMass.cs.meta
  25. +21
    -0
      OneButtonGame/Assets/Scripts/playerController.cs
  26. +12
    -0
      OneButtonGame/Assets/Scripts/playerController.cs.meta
  27. +9
    -0
      OneButtonGame/Assets/Textures.meta
  28. BIN
      OneButtonGame/Assets/Wall.physicsMaterial2D
  29. +8
    -0
      OneButtonGame/Assets/Wall.physicsMaterial2D.meta
  30. +9
    -0
      OneButtonGame/Assets/_Scenes.meta
  31. BIN
      OneButtonGame/Assets/_Scenes/_TestScene.unity
  32. +8
    -0
      OneButtonGame/Assets/_Scenes/_TestScene.unity.meta
  33. BIN
      OneButtonGame/Assets/center.mat
  34. +8
    -0
      OneButtonGame/Assets/center.mat.meta
  35. BIN
      OneButtonGame/ProjectSettings/AudioManager.asset
  36. BIN
      OneButtonGame/ProjectSettings/ClusterInputManager.asset
  37. BIN
      OneButtonGame/ProjectSettings/DynamicsManager.asset
  38. BIN
      OneButtonGame/ProjectSettings/EditorBuildSettings.asset
  39. BIN
      OneButtonGame/ProjectSettings/EditorSettings.asset
  40. BIN
      OneButtonGame/ProjectSettings/GraphicsSettings.asset
  41. BIN
      OneButtonGame/ProjectSettings/InputManager.asset
  42. BIN
      OneButtonGame/ProjectSettings/NavMeshAreas.asset
  43. BIN
      OneButtonGame/ProjectSettings/NetworkManager.asset
  44. BIN
      OneButtonGame/ProjectSettings/Physics2DSettings.asset
  45. BIN
      OneButtonGame/ProjectSettings/ProjectSettings.asset
  46. +2
    -0
      OneButtonGame/ProjectSettings/ProjectVersion.txt
  47. BIN
      OneButtonGame/ProjectSettings/QualitySettings.asset
  48. BIN
      OneButtonGame/ProjectSettings/TagManager.asset
  49. BIN
      OneButtonGame/ProjectSettings/TimeManager.asset
  50. BIN
      OneButtonGame/ProjectSettings/UnityAdsSettings.asset
  51. BIN
      OneButtonGame/ProjectSettings/UnityConnectSettings.asset

+ 27
- 0
.gitignore View File

@ -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

+ 9
- 0
OneButtonGame/Assets/Materials.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3977a5e8e03b325478dd9380ec363908
folderAsset: yes
timeCreated: 1458688821
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/Music.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3426ba420f94fbc4ca385f9506803cd3
folderAsset: yes
timeCreated: 1458647092
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/Original.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 03c16792e70cca44c8e410ca3535fb00
folderAsset: yes
timeCreated: 1458688805
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 55
- 0
OneButtonGame/Assets/Original/ConnecterOriginal.cs View File

@ -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);
}
}
}

+ 12
- 0
OneButtonGame/Assets/Original/ConnecterOriginal.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 27180fea04ecf554ba4fbdadf9e2edf4
timeCreated: 1458688872
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/Original/DebrisOriginal.prefab View File


+ 8
- 0
OneButtonGame/Assets/Original/DebrisOriginal.prefab.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5d7e8b34be0856b49b47d688a255b9a5
timeCreated: 1458688640
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 33
- 0
OneButtonGame/Assets/Original/ThrusterOriginal.cs View File

@ -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;
}
}
}

+ 12
- 0
OneButtonGame/Assets/Original/ThrusterOriginal.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 5760ed2be97f356429b5d88752235e39
timeCreated: 1458688495
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/Original/_TestScene - Copy.unity View File


+ 8
- 0
OneButtonGame/Assets/Original/_TestScene - Copy.unity.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8555d667d4774b34d88aa06cf43c0378
timeCreated: 1458688435
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/Prefabs.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c8d37cdfa8e95224baa80907c0a60d40
folderAsset: yes
timeCreated: 1458647097
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/Prefabs/Debris.prefab View File


+ 8
- 0
OneButtonGame/Assets/Prefabs/Debris.prefab.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 139c724080de4484dbb8b5166381e2f6
timeCreated: 1458649078
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/Scripts.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 96df8a3ffa6f2e343af8cc7937881b01
folderAsset: yes
timeCreated: 1458647077
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 56
- 0
OneButtonGame/Assets/Scripts/Connecter.cs View File

@ -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);
}
}
}

+ 12
- 0
OneButtonGame/Assets/Scripts/Connecter.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 09a54f990f19c894db43fcdf4e23915e
timeCreated: 1458650258
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 38
- 0
OneButtonGame/Assets/Scripts/DebrisController.cs View File

@ -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 () {
}
}

+ 12
- 0
OneButtonGame/Assets/Scripts/DebrisController.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b5725b85416ee2e4582d4ab44b32250f
timeCreated: 1458649837
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 60
- 0
OneButtonGame/Assets/Scripts/Thruster.cs View File

@ -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;
}
}

+ 12
- 0
OneButtonGame/Assets/Scripts/Thruster.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 49ee928b47e58ca4facb77d80a15f6d4
timeCreated: 1458648321
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 21
- 0
OneButtonGame/Assets/Scripts/centerOfMass.cs View File

@ -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;
}
}

+ 12
- 0
OneButtonGame/Assets/Scripts/centerOfMass.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f9e700e5521270442a8098e3dd18110e
timeCreated: 1458652726
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 21
- 0
OneButtonGame/Assets/Scripts/playerController.cs View File

@ -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 () {
}
}

+ 12
- 0
OneButtonGame/Assets/Scripts/playerController.cs.meta View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0cae769e2b517844686c1debf3321dc5
timeCreated: 1458687089
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/Textures.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: aeffc64116d43c94ab692a3ba425e7b9
folderAsset: yes
timeCreated: 1458647086
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/Wall.physicsMaterial2D View File


+ 8
- 0
OneButtonGame/Assets/Wall.physicsMaterial2D.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aad2217d76cf6094b921a002251b8d90
timeCreated: 1458650093
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

+ 9
- 0
OneButtonGame/Assets/_Scenes.meta View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8492a128e31ae834c939a77b96a13b1d
folderAsset: yes
timeCreated: 1458647072
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/_Scenes/_TestScene.unity View File


+ 8
- 0
OneButtonGame/Assets/_Scenes/_TestScene.unity.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4722d74a92e6ec84ba62ff842b22809c
timeCreated: 1458647122
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/Assets/center.mat View File


+ 8
- 0
OneButtonGame/Assets/center.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a7d17c5d3d85e61498a0e69aa3b00e30
timeCreated: 1458654797
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
OneButtonGame/ProjectSettings/AudioManager.asset View File


BIN
OneButtonGame/ProjectSettings/ClusterInputManager.asset View File


BIN
OneButtonGame/ProjectSettings/DynamicsManager.asset View File


BIN
OneButtonGame/ProjectSettings/EditorBuildSettings.asset View File


BIN
OneButtonGame/ProjectSettings/EditorSettings.asset View File


BIN
OneButtonGame/ProjectSettings/GraphicsSettings.asset View File


BIN
OneButtonGame/ProjectSettings/InputManager.asset View File


BIN
OneButtonGame/ProjectSettings/NavMeshAreas.asset View File


BIN
OneButtonGame/ProjectSettings/NetworkManager.asset View File


BIN
OneButtonGame/ProjectSettings/Physics2DSettings.asset View File


BIN
OneButtonGame/ProjectSettings/ProjectSettings.asset View File


+ 2
- 0
OneButtonGame/ProjectSettings/ProjectVersion.txt View File

@ -0,0 +1,2 @@
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0

BIN
OneButtonGame/ProjectSettings/QualitySettings.asset View File


BIN
OneButtonGame/ProjectSettings/TagManager.asset View File


BIN
OneButtonGame/ProjectSettings/TimeManager.asset View File


BIN
OneButtonGame/ProjectSettings/UnityAdsSettings.asset View File


BIN
OneButtonGame/ProjectSettings/UnityConnectSettings.asset View File


Loading…
Cancel
Save