From 918efe6079b8705d559e916c512e3ab0fad88167 Mon Sep 17 00:00:00 2001 From: Joshua Reason Date: Mon, 4 May 2015 12:00:28 +1000 Subject: [PATCH] added confetti on hit + respawn --- playable/Assets/Confetti.prefab | Bin 0 -> 10288 bytes playable/Assets/Confetti.prefab.meta | 4 ++ playable/Assets/Lachlan_jump_work.unity | Bin 150980 -> 155540 bytes playable/Assets/Scripts/PlayerControler.cs | 20 ++++++ playable/Assets/Scripts/confettiController.cs | 59 ++++++++++++++++++ .../Assets/Scripts/confettiController.cs.meta | 8 +++ playable/Assets/Scripts/player2_controls.cs | 22 +++++++ 7 files changed, 113 insertions(+) create mode 100644 playable/Assets/Confetti.prefab create mode 100644 playable/Assets/Confetti.prefab.meta create mode 100644 playable/Assets/Scripts/confettiController.cs create mode 100644 playable/Assets/Scripts/confettiController.cs.meta diff --git a/playable/Assets/Confetti.prefab b/playable/Assets/Confetti.prefab new file mode 100644 index 0000000000000000000000000000000000000000..e08a543b06b69d566efaf64f0ccdd93eabef219b GIT binary patch literal 10288 zcmeHN&2J<}6|W&5BoGMSgz#l2Eb(c{$Fky(-Hg|}*^F3c&Dcw%90KK;nwduJ?ooH! z@#HioI7RRmARlu7d zs`q~Ns@ld}c-xqbr;RZW8*|}3x|>TEFJHVgdB%KndV2a0J=5)UJ5ADSZf1|7^e{8m zZ0`6q;E*1Emd1RZZih)8O%pd>i;}_|{NnchuiU73DH^*MV>`{w{RClndH3m^og#bw z#yBd{?8b57sFF0fO67MlH?jLWHgicKbr~r28M+`S-lIP}OM@>)u^U|HcJ2d$#DkC) z(2gx;B?t;ZG>DavmTMgbN#U}@#@zk`Qm87`+5UqK5FT6Yf3^d}?ccNqPI?R->L+d= zV*r8HoAle+K20f$2jQXB{^tZ!)r7}8)YqR-qc;+}AGU!f?lN@7Frz(Ho9U?JJZ4@gSr}Gn<*QEiAwNDqfLjM5T<3+*WM! zd@v?Uk0z1JSi7%DDJiy;;-Xir-PcvMo!WgvS5l@!?Y`N8n8c|q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<8)m9lgb5Tkub8)N&dkIp8Ohbjd_zUU(@pO2hH#3d5Eps{jFBVR+%!mK{*KdEn z@u!<_zVi0)sYm|)0adm_&@MyqR?LT3p2;XM-L0i7Y}3;GE`{~;J#3e_jB zC?cfqB!#6gXN){8Gz2{E`W^Jav!9zfZ~4N;hkyCom4E!E|MY7~|Hp6r`HH`4Or1jA zT6Dd=UhkB8`hr}7YT|X-I*l?SO?*&4LEbITgU-UebNB8Q)b`HZTUVO6=CiI}H1NN^ jAGL1CIjg+SgMGcX_@l3g?x^FWj~5<;beCX$dIb6}dboc% literal 0 HcmV?d00001 diff --git a/playable/Assets/Confetti.prefab.meta b/playable/Assets/Confetti.prefab.meta new file mode 100644 index 0000000..86963bf --- /dev/null +++ b/playable/Assets/Confetti.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 2b7103b046272c1498dac632285c2739 +NativeFormatImporter: + userData: diff --git a/playable/Assets/Lachlan_jump_work.unity b/playable/Assets/Lachlan_jump_work.unity index e033436820affdc6dffd6cd058eee4c09a84b5bd..612cfb354b66c13a32ff713bd1d4f07b62d9c05e 100644 GIT binary patch delta 19234 zcmZYH3tUt6|3C0^5OE^tRFVN+hN7T=OhB0mIPdemydWCt5U`;j6HGDD%{%68x@ybP zrs?06X)`L&EYWUcW_YRaQeV7OE3GKIU^jlR&)9+YXMY}#s}xtxuQ??2!E z=`-#73c~;D1-}JP3xd#I5bE(D2+0G73`|}$NcgX*sY!|F53Nsy4>&PR>%TiHR+Lv9 z=<|_ibqz?VnCkbrSn;f^ho5z5V3*EI^Hz>7TDmB2`SN^0hO7EnM@)|rqpf0Klo*45 zyIO7ju@zqjR`^>h0%I#qcd`dqcXx`dFm(&`x6bSqTk%Ht#WvQh;jv-|TE%B#$fAOx z?Bzm1{-V5@`Gt9cKMGe^KhuS^EivZh^{TVNvcXVN`ZW zo{$8RzWgfA%>PWZMx^(&-q3ZjPEGITc`QlqVSQmvNBOLhyz#}^EAp4G5=30m(Q26!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%jTWsI*)H{5hZxvK3_V7-rrACFyMSRRlLVcYctnXBD*w<;{VSaEEoOIxG z-`JXd!Eb3v3;g=`zWQGIo}b1yFB|eWx>EB4zbO=p;EI!+S^V6|$5~{jc}cTY7`FT3OJ(slpYo06^ZK#qPW#5P^E5wLf>K_&$XoER z>=GYeU+lNPw5+_ux37Qk<14-w2%Njb3wW4(nJ?noR{nUIKi(4kZoP%#M_InO#iukA z%Xj;=kg|I}ceL1VVZkeJMOYNKc^luV^3-j9aG0g0I|dk6%O|3YLuxVqZ7e0VI1{^) zGe*>(X{hBxD=*jbYTh^K_v#0&`bQkJrQ{#Xmc(-9A7B0Y{LB9t+OSE&ESV2^MSW=m ztkOFV`EM*gbVZNVkN8*BESkL#Y{Chyim?nJdO5i1N zYjhm$%Pt!p(xnMj+Z!W8QtKnepKMO7{!mH fElZKX^AAUbw6*MLc-|d!VU*ZlWz*3iTcZ9SyO3{G diff --git a/playable/Assets/Scripts/PlayerControler.cs b/playable/Assets/Scripts/PlayerControler.cs index be7907b..e15c298 100644 --- a/playable/Assets/Scripts/PlayerControler.cs +++ b/playable/Assets/Scripts/PlayerControler.cs @@ -17,6 +17,7 @@ public class PlayerControler : MonoBehaviour { public GameObject bullet; public GameObject heart; bool canJump = true; + public GameObject newConfetti; @@ -34,6 +35,9 @@ public class PlayerControler : MonoBehaviour { if (updateHealth) displayHealth (health); + if (health == 0) + death(); + if (Input.GetKey (KeyCode.UpArrow)){ if (canJump == true){ @@ -73,6 +77,21 @@ public class PlayerControler : MonoBehaviour { } } + private void Confettishoot(Vector3 target,float size){ + Debug.Log ("Creating Confetti"); + + target.y += 1.5f; + for (int i = 0; i col.transform.position.y){ col.gameObject.GetComponent().health --; + Confettishoot(col.gameObject.transform.position,200.0f); //health --; rigidbody2D.velocity = jumpVector; canJump = false; diff --git a/playable/Assets/Scripts/confettiController.cs b/playable/Assets/Scripts/confettiController.cs new file mode 100644 index 0000000..df1bd4a --- /dev/null +++ b/playable/Assets/Scripts/confettiController.cs @@ -0,0 +1,59 @@ +using UnityEngine; +using System.Collections; + +public class confettiController : MonoBehaviour { + + public float lifeTime = 0.5f; + public float speed = 5; + + private float startTime; + private float startScale; + + // Use this for initialization + void Start () { + float rand = Random.Range (0, 7); + int randColour = Mathf.FloorToInt (rand); + startTime = Time.time; + startScale = transform.localScale.x; + rigidbody.velocity = Random.onUnitSphere * speed; + + switch (randColour) { + case 0: + renderer.material.color = Color.cyan; + break; + case 1: + renderer.material.color = Color.red; + break; + case 2: + renderer.material.color = Color.blue; + break; + case 3: + renderer.material.color = Color.green; + break; + case 4: + renderer.material.color = Color.yellow; + break; + case 5: + renderer.material.color = Color.magenta; + break; + default: + renderer.material.color = Color.black; + break; + } + + + + } + + // Update is called once per frame + void Update () { + float newScale = Mathf.Lerp(0, startScale, Time.deltaTime / lifeTime); + transform.localScale = new Vector3(startScale-newScale, startScale-newScale, startScale-newScale); + + if (Time.time - startTime > lifeTime) { + Destroy (gameObject, 0.0f); + } + + + } +} diff --git a/playable/Assets/Scripts/confettiController.cs.meta b/playable/Assets/Scripts/confettiController.cs.meta new file mode 100644 index 0000000..a72de43 --- /dev/null +++ b/playable/Assets/Scripts/confettiController.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cf3e4ef8e9821b74d8758c2572c02c3f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/playable/Assets/Scripts/player2_controls.cs b/playable/Assets/Scripts/player2_controls.cs index a0b5ce6..7efdbf0 100644 --- a/playable/Assets/Scripts/player2_controls.cs +++ b/playable/Assets/Scripts/player2_controls.cs @@ -18,6 +18,7 @@ public class player2_controls : MonoBehaviour { public GameObject heart; bool canJump = true; + public GameObject newConfetti; @@ -34,6 +35,9 @@ public class player2_controls : MonoBehaviour { } if (updateHealth) displayHealth (health); + + if (health == 0) + death(); if (Input.GetKey (KeyCode.W)){ if (canJump == true){ @@ -73,12 +77,30 @@ public class player2_controls : MonoBehaviour { } } + private void Confettishoot(Vector3 target,float size){ + Debug.Log ("Creating Confetti"); + + target.y += 1.5f; + for (int i = 0; i col.transform.position.y){ col.gameObject.GetComponent().health --; + Confettishoot(col.gameObject.transform.position,200.0f); + //health --; rigidbody2D.velocity = jumpVector; canJump = false;