diff --git a/ShipShooter/Assets/Enemies/Enemy1 1.prefab b/ShipShooter/Assets/Enemies/Enemy1 1.prefab index 5d271d3a..1aa62dc0 100644 Binary files a/ShipShooter/Assets/Enemies/Enemy1 1.prefab and b/ShipShooter/Assets/Enemies/Enemy1 1.prefab differ diff --git a/ShipShooter/Assets/Enemies/Enemy1 1.prefab.meta b/ShipShooter/Assets/Enemies/Enemy1 1.prefab.meta index 5a25ed3c..3068d3ec 100644 --- a/ShipShooter/Assets/Enemies/Enemy1 1.prefab.meta +++ b/ShipShooter/Assets/Enemies/Enemy1 1.prefab.meta @@ -1,6 +1,6 @@ fileFormatVersion: 2 guid: 6ffdc1109f146e94aadecee927f14e26 -timeCreated: 1446687718 +timeCreated: 1447015041 licenseType: Free NativeFormatImporter: userData: diff --git a/ShipShooter/Assets/Enemies/Enemy2.prefab b/ShipShooter/Assets/Enemies/Enemy2.prefab index 4906d1c8..bbb3796b 100644 Binary files a/ShipShooter/Assets/Enemies/Enemy2.prefab and b/ShipShooter/Assets/Enemies/Enemy2.prefab differ diff --git a/ShipShooter/Assets/Enemies/Legosteroid.prefab b/ShipShooter/Assets/Enemies/Legosteroid.prefab index fbfcabc4..3cee418d 100644 Binary files a/ShipShooter/Assets/Enemies/Legosteroid.prefab and b/ShipShooter/Assets/Enemies/Legosteroid.prefab differ diff --git a/ShipShooter/Assets/Player/BulletLego.prefab b/ShipShooter/Assets/Player/BulletLego.prefab index 52a03be9..68c10bd1 100644 Binary files a/ShipShooter/Assets/Player/BulletLego.prefab and b/ShipShooter/Assets/Player/BulletLego.prefab differ diff --git a/ShipShooter/Assets/Scenes/GameScene.unity b/ShipShooter/Assets/Scenes/GameScene.unity index 271def9b..21304ca5 100644 Binary files a/ShipShooter/Assets/Scenes/GameScene.unity and b/ShipShooter/Assets/Scenes/GameScene.unity differ diff --git a/ShipShooter/Assets/Scripts/Enemy1.cs b/ShipShooter/Assets/Scripts/Enemy1.cs index f724cdf4..23c56638 100644 --- a/ShipShooter/Assets/Scripts/Enemy1.cs +++ b/ShipShooter/Assets/Scripts/Enemy1.cs @@ -3,13 +3,22 @@ using System.Collections; public class Enemy1 : MonoBehaviour { - // Use this for initialization - void Start () { - - } - - // Update is called once per frame - void Update () { - - } + public int health = 1; + + void OnCollisionEnter(Collision collision) + { + if (collision.gameObject.tag == "Bullet") + { + Destroy(gameObject); + + } + } + + void Update() + { + + if (health == 0) + Destroy(gameObject); + } + } diff --git a/ShipShooter/Assets/Scripts/PlayerControls.cs b/ShipShooter/Assets/Scripts/PlayerControls.cs index 8720f820..4b793c8a 100644 --- a/ShipShooter/Assets/Scripts/PlayerControls.cs +++ b/ShipShooter/Assets/Scripts/PlayerControls.cs @@ -11,7 +11,7 @@ public class PlayerControls : MonoBehaviour { public float yPos; public Vector3 playerLocation; - + public Vector3 playerAngle = new Vector3(270, 0, 0); //Counting shit public float distance = 0.25f; @@ -45,6 +45,8 @@ public class PlayerControls : MonoBehaviour { // Update is called once per frame void Update () { + if (transform.eulerAngles != playerAngle) + transform.eulerAngles = playerAngle; //Movement------------------------------------------------------------------------------------------------------------ //Left @@ -88,22 +90,16 @@ public class PlayerControls : MonoBehaviour { //Canon positions - posLeftCanon = new Vector3(leftCanon.transform.position.x, leftCanon.transform.position.y, leftCanon.transform.position.z); - posRightCanon = new Vector3(rightCanon.transform.position.x + 1.21f, rightCanon.transform.position.y, rightCanon.transform.position.z); + posLeftCanon = new Vector3(leftCanon.transform.position.x, leftCanon.transform.position.y + 0.5f, leftCanon.transform.position.z); + posRightCanon = new Vector3(rightCanon.transform.position.x + 1.21f, rightCanon.transform.position.y + 0.5f, rightCanon.transform.position.z); //Spawn Bullets if (Input.GetKeyDown(KeyCode.Space)) { leftBullet = (GameObject) Instantiate(playerBullet, posLeftCanon, transform.rotation); iTween.MoveTo(leftBullet, new Vector3(leftBullet.transform.position.x, leftBullet.transform.position.y + 20, 5), 1); - // Instantiate(playerBullet, posLeftCanon, Quaternion.identity); - // // iTween.MoveTo. - //// rigidBullet.AddForce(transform.forward * thurst); - // rigidBullet.AddRelativeForce(transform.forward * thurst); - - - Debug.Log("got to the second"); - Instantiate(playerBullet, posRightCanon, Quaternion.identity); + rightBullet = (GameObject)Instantiate(playerBullet, posRightCanon, transform.rotation); + iTween.MoveTo(rightBullet, new Vector3(rightBullet.transform.position.x, rightBullet.transform.position.y + 20, 5), 1); } diff --git a/ShipShooter/Library/CurrentLayout.dwlt b/ShipShooter/Library/CurrentLayout.dwlt index 72ef5f01..e280d9c9 100644 Binary files a/ShipShooter/Library/CurrentLayout.dwlt and b/ShipShooter/Library/CurrentLayout.dwlt differ diff --git a/ShipShooter/Library/InspectorExpandedItems.asset b/ShipShooter/Library/InspectorExpandedItems.asset index 7b90bf18..c1af6d17 100644 Binary files a/ShipShooter/Library/InspectorExpandedItems.asset and b/ShipShooter/Library/InspectorExpandedItems.asset differ diff --git a/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb b/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb index 43d68eab..e84c11cb 100644 Binary files a/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb and b/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll.mdb differ diff --git a/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb b/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb index c3706ddf..1cc45515 100644 Binary files a/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb and b/ShipShooter/Library/ScriptAssemblies/Assembly-CSharp.dll.mdb differ diff --git a/ShipShooter/Library/assetDatabase3 b/ShipShooter/Library/assetDatabase3 index 46665363..a4b53fb4 100644 Binary files a/ShipShooter/Library/assetDatabase3 and b/ShipShooter/Library/assetDatabase3 differ diff --git a/ShipShooter/Library/expandedItems b/ShipShooter/Library/expandedItems index 872585a9..e1839825 100644 Binary files a/ShipShooter/Library/expandedItems and b/ShipShooter/Library/expandedItems differ diff --git a/ShipShooter/Library/metadata/00/00000000000000003000000000000000 b/ShipShooter/Library/metadata/00/00000000000000003000000000000000 index c45e4934..cd1eccb7 100644 Binary files a/ShipShooter/Library/metadata/00/00000000000000003000000000000000 and b/ShipShooter/Library/metadata/00/00000000000000003000000000000000 differ diff --git a/ShipShooter/Library/metadata/00/00000000000000004000000000000000 b/ShipShooter/Library/metadata/00/00000000000000004000000000000000 index 671f6750..3df3458a 100644 Binary files a/ShipShooter/Library/metadata/00/00000000000000004000000000000000 and b/ShipShooter/Library/metadata/00/00000000000000004000000000000000 differ diff --git a/ShipShooter/Library/metadata/3d/3d6f92a605a842645b772002f4f174a9 b/ShipShooter/Library/metadata/3d/3d6f92a605a842645b772002f4f174a9 index aa3e4265..d142adf8 100644 Binary files a/ShipShooter/Library/metadata/3d/3d6f92a605a842645b772002f4f174a9 and b/ShipShooter/Library/metadata/3d/3d6f92a605a842645b772002f4f174a9 differ diff --git a/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26 b/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26 index 93c076ca..c8a64299 100644 Binary files a/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26 and b/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26 differ diff --git a/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26.info b/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26.info index b9516da8..b5fdbbba 100644 Binary files a/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26.info and b/ShipShooter/Library/metadata/6f/6ffdc1109f146e94aadecee927f14e26.info differ diff --git a/ShipShooter/Library/metadata/90/9036b8076da40aa4bbfa8c39d824e915 b/ShipShooter/Library/metadata/90/9036b8076da40aa4bbfa8c39d824e915 index 0df572d6..ae3f6dbb 100644 Binary files a/ShipShooter/Library/metadata/90/9036b8076da40aa4bbfa8c39d824e915 and b/ShipShooter/Library/metadata/90/9036b8076da40aa4bbfa8c39d824e915 differ diff --git a/ShipShooter/Library/metadata/99/9916a7d191d1c1243aacf2506d7f567c.info b/ShipShooter/Library/metadata/99/9916a7d191d1c1243aacf2506d7f567c.info index 131269b1..9cf9ddcb 100644 Binary files a/ShipShooter/Library/metadata/99/9916a7d191d1c1243aacf2506d7f567c.info and b/ShipShooter/Library/metadata/99/9916a7d191d1c1243aacf2506d7f567c.info differ diff --git a/ShipShooter/ProjectSettings/TagManager.asset b/ShipShooter/ProjectSettings/TagManager.asset index b3aaf0f8..88a093cd 100644 Binary files a/ShipShooter/ProjectSettings/TagManager.asset and b/ShipShooter/ProjectSettings/TagManager.asset differ diff --git a/ShipShooter/ShipShooter.CSharp.Editor.csproj b/ShipShooter/ShipShooter.CSharp.Editor.csproj index 078524b6..9049ca7a 100644 --- a/ShipShooter/ShipShooter.CSharp.Editor.csproj +++ b/ShipShooter/ShipShooter.CSharp.Editor.csproj @@ -105,21 +105,6 @@ Library\UnityAssemblies\SyntaxTree.VisualStudio.Unity.Bridge.dll - - Library\UnityAssemblies\UnityEditor.Networking.dll - - - Library\UnityAssemblies\UnityEditor.UI.dll - - - Library\UnityAssemblies\UnityEngine.Networking.dll - - - Library\UnityAssemblies\UnityEditor.Advertisements.dll - - - Library\UnityAssemblies\UnityEngine.UI.dll - Library\UnityAssemblies\Mono.Cecil.dll diff --git a/ShipShooter/ShipShooter.CSharp.csproj b/ShipShooter/ShipShooter.CSharp.csproj index a2f03ad8..86e18031 100644 --- a/ShipShooter/ShipShooter.CSharp.csproj +++ b/ShipShooter/ShipShooter.CSharp.csproj @@ -57,12 +57,6 @@ Library\UnityAssemblies\UnityEngine.Networking.dll - - Library\UnityAssemblies\UnityEngine.Networking.dll - - - Library\UnityAssemblies\UnityEngine.UI.dll - Library\UnityAssemblies\UnityEditor.dll