diff --git a/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller b/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller index 61a378e..14a84ea 100644 Binary files a/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller and b/DreamInvasion/Assets/Resources/Animations/animation tonneau explosif_0.controller differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab b/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab index 393d1e4..a27d2e1 100644 Binary files a/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab and b/DreamInvasion/Assets/Resources/Prefabs/Tonneau explosif.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab b/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab new file mode 100644 index 0000000..f3c458a Binary files /dev/null and b/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab differ diff --git a/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab.meta b/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab.meta new file mode 100644 index 0000000..e987d9a --- /dev/null +++ b/DreamInvasion/Assets/Resources/Prefabs/Warrior.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 24e01a9537879b5468801c10b192c059 +timeCreated: 1448125160 +licenseType: Free +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Scenes/Steph_Anim.unity b/DreamInvasion/Assets/Scenes/Steph_Anim.unity index 7855f60..d877743 100644 Binary files a/DreamInvasion/Assets/Scenes/Steph_Anim.unity and b/DreamInvasion/Assets/Scenes/Steph_Anim.unity differ diff --git a/DreamInvasion/Assets/Scripts/Attack.cs b/DreamInvasion/Assets/Scripts/Attack.cs index 9d941d3..607c9d1 100644 --- a/DreamInvasion/Assets/Scripts/Attack.cs +++ b/DreamInvasion/Assets/Scripts/Attack.cs @@ -42,7 +42,7 @@ void Update () { this.GetComponent().enabled = true; - scriptRotation.RotateDown(); + //scriptRotation.RotateDown(); this.timeOfLastAttack = Time.time; attacked = true; @@ -53,7 +53,7 @@ void Update () { this.GetComponent().enabled = false; attacked = false; - scriptRotation.RotateUp(); + //scriptRotation.RotateUp(); } } diff --git a/DreamInvasion/Assets/Scripts/Player/Health.cs b/DreamInvasion/Assets/Scripts/Player/Health.cs index f3c77f7..6f5671a 100644 --- a/DreamInvasion/Assets/Scripts/Player/Health.cs +++ b/DreamInvasion/Assets/Scripts/Player/Health.cs @@ -1,12 +1,16 @@ using UnityEngine; using System.Collections; using System; +using UnityEngine.UI; public class Health : MonoBehaviour { public float lifeLeft; float lifeMax; + [SerializeField] + Slider lifeSlider; + Character scriptCharacter; public static event Action OnDeath; @@ -18,12 +22,15 @@ void Start () { this.lifeMax = scriptCharacter.lifeMax; lifeLeft = lifeMax; + lifeSlider.value = lifeLeft / lifeMax; + } // Update is called once per frame void Update () { - - } + + lifeSlider.value = lifeLeft / lifeMax; + } public void TakeDamage(float damage) { diff --git a/DreamInvasion/Assets/Scripts/Player/LockRot.cs b/DreamInvasion/Assets/Scripts/Player/LockRot.cs new file mode 100644 index 0000000..6b31b6f --- /dev/null +++ b/DreamInvasion/Assets/Scripts/Player/LockRot.cs @@ -0,0 +1,28 @@ +using UnityEngine; +using System.Collections; + +public class LockRot : MonoBehaviour { + + bool test = false; + + // Use this for initialization + void Start () { + + } + + // Update is called once per frame + void Update () { + + if(transform.parent.localScale.x < 0 && transform.localScale.x >0 ) { + Vector3 theScale = transform.localScale; + theScale.x *= -1; + transform.localScale = theScale; + } + + if (transform.parent.localScale.x > 0 && transform.localScale.x < 0) { + Vector3 theScale = transform.localScale; + theScale.x *= -1; + transform.localScale = theScale; + } + } +} diff --git a/DreamInvasion/Assets/Scripts/Player/LockRot.cs.meta b/DreamInvasion/Assets/Scripts/Player/LockRot.cs.meta new file mode 100644 index 0000000..f457858 --- /dev/null +++ b/DreamInvasion/Assets/Scripts/Player/LockRot.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c9c05208504281946bd6c922a64f50ec +timeCreated: 1448135624 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Sprites/Boss.meta b/DreamInvasion/Assets/Sprites/Boss.meta new file mode 100644 index 0000000..f630456 --- /dev/null +++ b/DreamInvasion/Assets/Sprites/Boss.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f4b8eb6e0068a5645aadc017b0d9ba88 +folderAsset: yes +timeCreated: 1448165764 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/DreamInvasion/Assets/Standard Assets/2D/Scripts/PlatformerCharacter2D.cs b/DreamInvasion/Assets/Standard Assets/2D/Scripts/PlatformerCharacter2D.cs index 1e1faa6..a3333ee 100644 --- a/DreamInvasion/Assets/Standard Assets/2D/Scripts/PlatformerCharacter2D.cs +++ b/DreamInvasion/Assets/Standard Assets/2D/Scripts/PlatformerCharacter2D.cs @@ -37,32 +37,31 @@ private void FixedUpdate() // The player is grounded if a circlecast to the groundcheck position hits anything designated as ground // This can be done using layers instead but Sample Assets will not overwrite your project settings. Collider2D[] colliders = Physics2D.OverlapCircleAll(m_GroundCheck.position, k_GroundedRadius, m_WhatIsGround); - for (int i = 0; i < colliders.Length; i++) - { + for (int i = 0; i < colliders.Length; i++) { if (colliders[i].gameObject != gameObject) m_Grounded = true; } m_Anim.SetBool("Ground", m_Grounded); - // Set the vertical animation + //Set the vertical animation m_Anim.SetFloat("vSpeed", m_Rigidbody2D.velocity.y); } public void Move(float move, bool crouch, bool jump) { - // If crouching, check to see if the character can stand up - if (!crouch && m_Anim.GetBool("Crouch")) - { - // If the character has a ceiling preventing them from standing up, keep them crouching - if (Physics2D.OverlapCircle(m_CeilingCheck.position, k_CeilingRadius, m_WhatIsGround)) - { - crouch = true; - } - } - - // Set whether or not the character is crouching in the animator - m_Anim.SetBool("Crouch", crouch); + //// If crouching, check to see if the character can stand up + //if (!crouch && m_Anim.GetBool("Crouch")) + //{ + // // If the character has a ceiling preventing them from standing up, keep them crouching + // if (Physics2D.OverlapCircle(m_CeilingCheck.position, k_CeilingRadius, m_WhatIsGround)) + // { + // crouch = true; + // } + //} + + //// Set whether or not the character is crouching in the animator + //m_Anim.SetBool("Crouch", crouch); //only control the player if grounded or airControl is turned on if (m_Grounded || m_AirControl) @@ -71,7 +70,7 @@ public void Move(float move, bool crouch, bool jump) move = (crouch ? move*m_CrouchSpeed : move); // The Speed animator parameter is set to the absolute value of the horizontal input. - m_Anim.SetFloat("Speed", Mathf.Abs(move)); + //m_Anim.SetFloat("Speed", Mathf.Abs(move)); // Move the character m_Rigidbody2D.velocity = new Vector2(move*m_MaxSpeed, m_Rigidbody2D.velocity.y); diff --git a/DreamInvasion/DreamInvasion.CSharp.csproj b/DreamInvasion/DreamInvasion.CSharp.csproj index 3173f75..276a875 100644 --- a/DreamInvasion/DreamInvasion.CSharp.csproj +++ b/DreamInvasion/DreamInvasion.CSharp.csproj @@ -86,7 +86,9 @@ + + diff --git a/DreamInvasion/DreamInvasion.sln b/DreamInvasion/DreamInvasion.sln index c9417d6..ef36924 100644 --- a/DreamInvasion/DreamInvasion.sln +++ b/DreamInvasion/DreamInvasion.sln @@ -1,11 +1,11 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2008 - -Project("{9FB2C7AD-B6CD-5B81-F8E6-9B314D33929E}") = "DreamInvasion", "Assembly-CSharp-firstpass.csproj", "{3615F7D1-2DD0-A55E-4DB6-D9D212FA26C4}" + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2015 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DreamInvasion.CSharp.Plugins", "DreamInvasion.CSharp.Plugins.csproj", "{E0B26F60-398E-DFAD-5C48-A03653CBF50D}" EndProject -Project("{9FB2C7AD-B6CD-5B81-F8E6-9B314D33929E}") = "DreamInvasion", "Assembly-CSharp.csproj", "{C236A460-C861-FD22-82ED-5F0BDFC4D868}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DreamInvasion.CSharp", "DreamInvasion.CSharp.csproj", "{F59E4867-AA9E-9FD0-7E76-D6D1017B02F0}" EndProject -Project("{9FB2C7AD-B6CD-5B81-F8E6-9B314D33929E}") = "DreamInvasion", "Assembly-CSharp-Editor.csproj", "{107AE060-1812-8E04-0086-6972047B299C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DreamInvasion.CSharp.Editor", "DreamInvasion.CSharp.Editor.csproj", "{0720C955-728E-25C9-91DE-7EC3EB4BFB9B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,40 +13,20 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3615F7D1-2DD0-A55E-4DB6-D9D212FA26C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3615F7D1-2DD0-A55E-4DB6-D9D212FA26C4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3615F7D1-2DD0-A55E-4DB6-D9D212FA26C4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3615F7D1-2DD0-A55E-4DB6-D9D212FA26C4}.Release|Any CPU.Build.0 = Release|Any CPU - {C236A460-C861-FD22-82ED-5F0BDFC4D868}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C236A460-C861-FD22-82ED-5F0BDFC4D868}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C236A460-C861-FD22-82ED-5F0BDFC4D868}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C236A460-C861-FD22-82ED-5F0BDFC4D868}.Release|Any CPU.Build.0 = Release|Any CPU - {107AE060-1812-8E04-0086-6972047B299C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {107AE060-1812-8E04-0086-6972047B299C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {107AE060-1812-8E04-0086-6972047B299C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {107AE060-1812-8E04-0086-6972047B299C}.Release|Any CPU.Build.0 = Release|Any CPU + {E0B26F60-398E-DFAD-5C48-A03653CBF50D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E0B26F60-398E-DFAD-5C48-A03653CBF50D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E0B26F60-398E-DFAD-5C48-A03653CBF50D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E0B26F60-398E-DFAD-5C48-A03653CBF50D}.Release|Any CPU.Build.0 = Release|Any CPU + {F59E4867-AA9E-9FD0-7E76-D6D1017B02F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F59E4867-AA9E-9FD0-7E76-D6D1017B02F0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F59E4867-AA9E-9FD0-7E76-D6D1017B02F0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F59E4867-AA9E-9FD0-7E76-D6D1017B02F0}.Release|Any CPU.Build.0 = Release|Any CPU + {0720C955-728E-25C9-91DE-7EC3EB4BFB9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0720C955-728E-25C9-91DE-7EC3EB4BFB9B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0720C955-728E-25C9-91DE-7EC3EB4BFB9B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0720C955-728E-25C9-91DE-7EC3EB4BFB9B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = Assembly-CSharp.csproj - Policies = $0 - $0.TextStylePolicy = $1 - $1.inheritsSet = null - $1.scope = text/x-csharp - $0.CSharpFormattingPolicy = $2 - $2.inheritsSet = Mono - $2.inheritsScope = text/x-csharp - $2.scope = text/x-csharp - $0.TextStylePolicy = $3 - $3.FileWidth = 120 - $3.TabWidth = 4 - $3.IndentWidth = 4 - $3.EolMarker = Unix - $3.inheritsSet = Mono - $3.inheritsScope = text/plain - $3.scope = text/plain - EndGlobalSection - EndGlobal diff --git a/DreamInvasion/ProjectSettings/ProjectSettings.asset b/DreamInvasion/ProjectSettings/ProjectSettings.asset index 3dad59e..d4dfbef 100644 Binary files a/DreamInvasion/ProjectSettings/ProjectSettings.asset and b/DreamInvasion/ProjectSettings/ProjectSettings.asset differ