From 2803b75aaec98ad2e487b6a9f83d587891df903c Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Mon, 4 May 2015 10:22:26 +1000 Subject: [PATCH] Added Health bar + landing on player will remove heart --- playable/Assets/Heart 1.prefab | Bin 0 -> 6432 bytes playable/Assets/Heart 1.prefab.meta | 4 ++ playable/Assets/Heart.png | Bin 0 -> 1134 bytes playable/Assets/Heart.png.meta | 47 ++++++++++++++++++++ playable/Assets/Heart.prefab | Bin 0 -> 6432 bytes playable/Assets/Heart.prefab.meta | 4 ++ playable/Assets/Lachlan_jump_work.unity | Bin 140620 -> 150980 bytes playable/Assets/Scripts/PlayerControler.cs | 34 +++++++++++++- playable/Assets/Scripts/player2_controls.cs | 33 +++++++++++++- playable/ProjectSettings/TagManager.asset | Bin 5776 -> 5800 bytes 10 files changed, 119 insertions(+), 3 deletions(-) create mode 100644 playable/Assets/Heart 1.prefab create mode 100644 playable/Assets/Heart 1.prefab.meta create mode 100644 playable/Assets/Heart.png create mode 100644 playable/Assets/Heart.png.meta create mode 100644 playable/Assets/Heart.prefab create mode 100644 playable/Assets/Heart.prefab.meta diff --git a/playable/Assets/Heart 1.prefab b/playable/Assets/Heart 1.prefab new file mode 100644 index 0000000000000000000000000000000000000000..7db77494a466f96f2984e62d78956e1a48378a44 GIT binary patch literal 6432 zcmeHL&5smC6t7WH!0!)4{8$GRMMM;q7!J7XF6=IoEHLf|@nW!dre>ziO!uazcGx8z z#_$Jt@=oI2c$Ay*#MP4rFPL~S@uU)OuJ8A%tNT@VBMFJ|!b^Ils^72by?RysdsU^> z-s?*3t1G2;DYf@I`d258zJK&Y=a~9?dwcsKs@LdQ2nPD%+NZi@)NC-+id5UcLV!_Y zr5>ffjc6ElBi*itkx_%ow#m7$t>^necgRq52f@E9H=8CoHP;SJoXl++O`XKi6t!6qt-<-QuN!CC&Vv?{fl#%eW?*_Lhr`U>`U07mk!_8+#G41{XQ{v#Ej5k)ypX!K{|!Fn9g&^g>N41v)Z`sM#53AWS> z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+YJ(*|u3O|Bq?Yw07Q*EIIE7gTt7Scn`7pUmU0zzhD1hDAaGI8iX+t9I8P~sY ziS=>+xyT91U?x@=4MuY5gKx<)+0|w0j=3^G) zY^)5EGu}Jv#jK2BYHlBvi^<&o?!1;&9+UeWvkg~s{wL~Y7Yyh5Pu?tE0JRZnu!pZh zwiA=@c0I9ROs?M1kF(?NQ3qHbb7OMPTz$OG1EHE6^*1)dH=yNSHQ0Z_+y{J^+%z_< zEGGBXwcd+uBh`-I#tJZ5ndC~x;)+YT*pjM9~V z7xLhgryeXBqdvMX!yIGPNB8Ae8RkuA_R$ZY9?(2aeRh8cb7Jz@y>b2B4;El@fVW~5 zm@IY9sauyh#;dsvSOAOUs{j7;Oasd@(*!k`kGU{e!tgCA%Y!kwKd^XbO@mce)AIG3 zmuF*gfF3M_$@bEYdJiqPOjLv2jviX>!Q@QNy!O%ZQcP~bvslI?wZV7aIk7w!legu= zn0B9v-z)K5BRYj0lRzh6E192UmppyTRnTj7|YmcKSujLBRb%skV$eN+Ev z`RjrnP?o>P_{}T*n0#|O_0px4NpsXo>@*g@HZm*Yc5WPJunf2Q>G&*`jb-xls!zwp z`kw;}L3xQ4@2|b80+So=JMo9FLx>Sprq zI`unwX*^Lk=l|{0Z>#>gGcSE7>bw-qov06}t2Zjz>(aZ`(i`Ppx?i7=zhEI9`?u(( zI>zr5HN9x{4E=iByb)I$6cshZsDIREWqdh_aU zK6|q28v?f<*S)+veOzCz#}_sHL{Dv$Up!Dx%D-5qH^|REuW!^F=l^|PZ&$ZAgLvva zJ#WqF=J}2bdXUcQeWCBET@&BV)E>H|_hD?WU((y<+mGm$eA{I`uBgFf{m|h2_?~)l YQDUcBj#@>prqqfz6^-as%hTll0at+{iU0rr diff --git a/playable/Assets/Scripts/PlayerControler.cs b/playable/Assets/Scripts/PlayerControler.cs index 6f77311..be7907b 100644 --- a/playable/Assets/Scripts/PlayerControler.cs +++ b/playable/Assets/Scripts/PlayerControler.cs @@ -11,7 +11,11 @@ public class PlayerControler : MonoBehaviour { public float speed; public Vector2 jumpVector; + public int health = 0; + private int displayedHealth = 0; + private bool updateHealth = false; public GameObject bullet; + public GameObject heart; bool canJump = true; @@ -24,6 +28,12 @@ public class PlayerControler : MonoBehaviour { animator.SetBool ("Fall", !canJump); applyPlayerDirection (Input.GetAxisRaw ("Horizontal_P1")); + if (displayedHealth != health) { + updateHealth = true; + } + if (updateHealth) + displayHealth (health); + if (Input.GetKey (KeyCode.UpArrow)){ if (canJump == true){ @@ -39,6 +49,20 @@ public class PlayerControler : MonoBehaviour { //} } + private void displayHealth(int health){ + GameObject[] hearts = GameObject.FindGameObjectsWithTag("heartUI2"); + foreach (GameObject desHeart in hearts) + GameObject.Destroy (desHeart); + + for (int i=1; i<= health; i++) { + GameObject heartCanister = Instantiate (heart) as GameObject; + Vector3 heartPos = new Vector3 (1-(i * 0.033f), 0.95f, 0); + heartCanister.transform.position = heartPos; + } + displayedHealth = health; + updateHealth = false; + } + private void applyPlayerDirection(float moveHorizontal) { if (moveHorizontal != 0) @@ -52,8 +76,16 @@ public class PlayerControler : MonoBehaviour { void OnCollisionEnter2D(Collision2D col){ if (col.collider.tag == "ground") canJump = true; - else if(col.collider.tag == "Player") + else if (col.collider.tag == "Player") { canJump = true; + if(transform.position.y>col.transform.position.y){ + col.gameObject.GetComponent().health --; + //health --; + rigidbody2D.velocity = jumpVector; + canJump = false; + } + + } } } diff --git a/playable/Assets/Scripts/player2_controls.cs b/playable/Assets/Scripts/player2_controls.cs index 4707768..a0b5ce6 100644 --- a/playable/Assets/Scripts/player2_controls.cs +++ b/playable/Assets/Scripts/player2_controls.cs @@ -11,7 +11,11 @@ public class player2_controls : MonoBehaviour { public float speed; public Vector2 jumpVector; + public int health = 0; + private int displayedHealth = 0; + private bool updateHealth = false; public GameObject bullet; + public GameObject heart; bool canJump = true; @@ -24,6 +28,12 @@ public class player2_controls : MonoBehaviour { animator.SetFloat("Velocity",velo.magnitude); animator.SetBool ("Fall", !canJump); applyPlayerDirection (Input.GetAxisRaw ("Horizontal_P2")); + + if (displayedHealth != health) { + updateHealth = true; + } + if (updateHealth) + displayHealth (health); if (Input.GetKey (KeyCode.W)){ if (canJump == true){ @@ -39,6 +49,19 @@ public class player2_controls : MonoBehaviour { //} } + private void displayHealth(int health){ + GameObject[] hearts = GameObject.FindGameObjectsWithTag("heartUI"); + foreach (GameObject desHeart in hearts) + GameObject.Destroy (desHeart); + + for (int i=1; i<= health; i++) { + GameObject heartCanister = Instantiate (heart) as GameObject; + Vector3 heartPos = new Vector3 ((i * 0.033f), 0.95f, 0); + heartCanister.transform.position = heartPos; + } + displayedHealth = health; + updateHealth = false; + } //Changes direction of sprite according to key pressed private void applyPlayerDirection(float moveHorizontal) { @@ -53,8 +76,14 @@ public class player2_controls : MonoBehaviour { void OnCollisionEnter2D(Collision2D col){ if (col.collider.tag == "ground") canJump = true; - else if(col.collider.tag == "Player") - canJump = true; + else if (col.collider.tag == "Player") { + if(transform.position.y>col.transform.position.y){ + col.gameObject.GetComponent().health --; + //health --; + rigidbody2D.velocity = jumpVector; + canJump = false; + } + } } diff --git a/playable/ProjectSettings/TagManager.asset b/playable/ProjectSettings/TagManager.asset index 16fc12e96d5d1f66ecd2b55e2f6381bf7dd397ce..1d4d8c265f57f5792a54a7498bdeadea78e83ba3 100644 GIT binary patch delta 87 zcmbQByFyozfkCvJfkA8q0|Nsmki7s%GnnX^>6vVlEEN^zU}RwM1B!q!1h7tCC@L+% X4&-E{CKi>1dNObz*hZ80h+Y8zTD%Y} delta 62 zcmZ3XJ3&{HfkCvJfkA8n0|Nsmki7s%GnnX^=^1a7EEN_00Oa{WF-V4ifqC*mQR&H7 HM6Un