Developer: Ian Kleton, Jannick Schalkwijk
Artists: Laura Bot (2D), Ranec Slof (3D)
Genre: Party game (minigames)
Code: C# Unity
Beschrijving: Een multiplayer partygame waarbij je tegen elkaar verschillende minigames speelt om coins te verzamelen. Het spel wordt gespeeld met de Pillo (http://www.pillogames.com/) en de minigames zijn bedoelt om steeds een andere mechanic van de Pillo te gebruiken om de minigame te voltooien. Het spel bevat een character select en alle minigames zijn dynamisch geprogrammeerd zodat ze zich aanpassen aan het aantal spelers dat mee speelt.
Progress blog: https://www.facebook.com/pillogamesacademy/
Character Select
Minigame Select
Tutorial Scherm Gjwhipe Out
Minigames
GJWhipeOut code
_________________________________
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 | using UnityEngine; using System.Collections; using UnityEngine.UI; using Pillo; using UnityEngine.Audio; public class WhipeOut : MonoBehaviour { public int PlayerCount; public AudioMixer background; public GameObject[] Level; public GameObject[] Characters; public float[] Pillos; private float[] Jump; private bool[] CanJump; public GameObject[] PlayerAnimation; public AnimationCurve JumpHeight; public GameObject Balk; public GameObject CountDown; public Sprite[] CountDownSprites; private GameObject[] Particles; private GameObject[] UI; private GameObject[] deadUI; private Sprite[] AnimationUI; private bool[] animate; private float animationSpeed = 1f; private int[] AnimationSprite; public int Alive; public Text TimeText; public AudioClip JumpSound; private float TimeLeft = 30; private bool Counting = true; private float countdown = 4; private int count = 3; private int lastcount = 4; private float Growth; public int[] Coins = new int[4]; Controller controller; bool ended = false; void Start() { controller = GameObject.Find("Controller").GetComponent<Controller>(); PlayerCount = controller.PlayerCount; animate = new bool[PlayerCount]; PlayerAnimation = new GameObject[PlayerCount]; UI = new GameObject[PlayerCount]; deadUI = new GameObject[PlayerCount]; AnimationUI = Resources.LoadAll<Sprite>("Sprites"); AnimationSprite = new int[PlayerCount]; CanJump = new bool[PlayerCount]; Jump = new float[PlayerCount]; Particles = new GameObject[PlayerCount]; if (PlayerCount == 2) { Level[0].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } if (PlayerCount == 3) { Level[1].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } if (PlayerCount == 4) { Level[2].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } for (int i = 0; i < PlayerCount; i++) { AnimationSprite[i] = 0; UI[i] = GameObject.Find("Player" + (i + 1) + "UI"); deadUI[i] = GameObject.Find("Player" + (i + 1) + "dead"); Particles[i] = GameObject.Find("JumpParticle" + (i + 1)); } for (int p = PlayerCount; p < 4; p++) { GameObject.Find("Player" + (p + 1) + "UI").SetActive(false); GameObject.Find("Player" + (p + 1) + "dead").SetActive(false); } Alive = PlayerCount; } void Update() { for (int j = 0; j < PlayerCount; j++) { if (PlayerAnimation[j] == null) { if (PlayerCount == 2) { Level[0].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } if (PlayerCount == 3) { Level[1].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } if (PlayerCount == 4) { Level[2].gameObject.SetActive(true); for (int i = 0; i < PlayerCount; i++) { Characters[i] = GameObject.Find("Player" + (i + 1)); } } Debug.Log(Characters[j].name); PlayerAnimation[j] = Characters[j].transform.GetChild(1).gameObject; } } int start = Mathf.RoundToInt(TimeLeft); if (Counting == true) { StartCountDown(); } if (TimeLeft > 0 && Alive > 1 && Counting == false) { TimeText.text = "" + TimeLeft.ToString("F0"); TimeLeft = TimeLeft - Time.deltaTime; } if (TimeLeft < 5.5f && TimeLeft > 0) { if (start == Mathf.RoundToInt(TimeLeft)) { TimeText.fontSize = Mathf.RoundToInt(TimeText.fontSize + Growth); Growth += 0.05f; } else { TimeText.fontSize = 43; Growth = 0; } TimeText.color = Color.red; } else if (TimeLeft <= 0 && !ended) { ended = true; TimeLeft = 0; TimeText.fontSize = 43; TimeText.text = "Game"; GameObject.Find("Axis").GetComponent<Staaf>().Spin = false; GameObject.Find("Axis").GetComponent<Staaf>().Speed = 0; for (int i = 0; i < PlayerCount; i++) { if (Characters[i] != null) { Debug.Log(Characters[i].name + " won!"); Coins[i] = 15; } } controller.MinigameEnded(Coins); } for (int i = 0; i < PlayerCount; i++) { try { Pillos[i] = PilloController.GetSensors((PilloID)i).x; } catch { } if (animate[i] == true) { try { UI[i].GetComponent<Image>().sprite = AnimationUI[((i * 16)) + AnimationSprite[i]]; } catch { animate[i] = false; } if (AnimationSprite[i] == 15) { animate[i] = false; } else { for (int a = 15 * (i - 1); a < 15 + (15 * i); a++) { animationSpeed -= Time.deltaTime; if (animationSpeed < 0) { AnimationSprite[i]++; animationSpeed = 1f; } } } } if (Characters[i] != null) { if (!Characters[i].GetComponent<Player>().hit) { if (Pillos[i] > 0.05f && CanJump[i] == false) { if (Characters[i] != null) { if (Characters[i].GetComponent<Player>().hit == false) { PlayerAnimation[i].GetComponent<Animator>().SetBool("Jump", true); GameObject.Find("AudioManager").GetComponent<AudioSource>().PlayOneShot(JumpSound); CanJump[i] = true; } } } if (CanJump[i] == true) { Pillos[i] = 0; Jump[i] += Time.deltaTime * 1.5f; if (Characters[i] != null) { Characters[i].transform.localPosition = new Vector3(0, 0, 9.5f + JumpHeight.Evaluate(Jump[i]) * 5f); } if (Jump[i] > 1) { PlayerAnimation[i].GetComponent<Animator>().SetBool("Jump", false); Particles[i].GetComponent<ParticleSystem>().Play(); Jump[i] = 0; CanJump[i] = false; } } } } } } public void CheckIfWinner(string Player) { for (int i = 0; i < PlayerCount; i++) { if (Characters[i] != null) { if (Characters[i].name == Player) { animate[i] = true; Characters[i] = null; Coins[i] = 20 - (5 * Alive); Alive--; } } } if (Alive == 1) { for (int i = 0; i < PlayerCount; i++) { if (Characters[i] != null) { GameObject.Find("Axis").GetComponent<Staaf>().Spin = false; TimeLeft = 0; TimeText.color = Color.red; TimeText.fontSize = 43; TimeText.text = "Game"; } } } } private void StartCountDown() { if (count < countdown && lastcount != count && count > 0) { lastcount = count; GameObject.Find("AudioManager").GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Sounds/countdown", typeof(AudioClip))); } count = Mathf.RoundToInt(countdown); if (countdown > 0) { TimeText.text = ""; countdown = countdown - Time.deltaTime; if (count == Mathf.FloorToInt(countdown)) { CountDown.GetComponent<RectTransform>().localScale += new Vector3(Growth, Growth, Growth); Growth += 0.001f; } else { CountDown.GetComponent<RectTransform>().localScale = new Vector3(1, 1, 1); Growth = 0; } CountDown.GetComponent<Image>().sprite = CountDownSprites[Mathf.FloorToInt(countdown)]; } if (countdown <= 0.1f && TimeLeft > 5.5f) { background.SetFloat("Volume", 0); GameObject.Find("AudioManager").GetComponent<AudioSource>().PlayOneShot((AudioClip)Resources.Load("Sounds/done", typeof(AudioClip))); TimeText.text = ""; GameObject.Find("Axis").GetComponent<Staaf>().start = 1; CountDown.gameObject.SetActive(false); Counting = false; } } } |




