// Tropfengenerator Spielflow void GenerateDrops() { // Tutorial Gelbphase if (score == 0) { dropPrefab = Instantiate(dropYellow, new Vector3(4.7f, 1.8f, 0.0f), Quaternion.identity) as GameObject; } if (score == 1) { dropPrefab = Instantiate(dropYellow, new Vector3(-2.2f, 3.2f, 0.0f), Quaternion.identity) as GameObject; } // Tutorial Grünphase if (score == 2) { dropPrefab = Instantiate(dropGreen, new Vector3(2.6f, 4.1f, 0.0f), Quaternion.identity) as GameObject; } if (score == 3) { dropPrefab = Instantiate(dropGreen, new Vector3(-5.2f, 1.5f, 0.0f), Quaternion.identity) as GameObject; } // Tutorial Rotphase if (score == 4) { dropPrefab = Instantiate(dropRed, new Vector3(-1.2f, 3.0f, 0.0f), Quaternion.identity) as GameObject; } if (score == 5) { dropPrefab = Instantiate(dropRed, new Vector3(-4.5f, 2.6f, 0.0f), Quaternion.identity) as GameObject; } if (score == 6) { phase2 = true; } // Zweite Phase mit 2 Tropfenspawns, speechbubble gelb if (phase2 == true) { dropPrefab = Instantiate(dropGreen, new Vector3(0.0f, 3.7f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropYellow, new Vector3(4.7f, 1.8f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "yellowRed" || turtleBehaviour.GetColor() == "yellowGreen") { phase2 = false; Invoke("SetPhase3", 0.1f); } } // Dritte Phase mit 2 Tropfenspawns, speechbubble gelb if (phase3 == true) { dropPrefab = Instantiate(dropYellow, new Vector3(-2.9f, 2.4f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropGreen, new Vector3(1.0f, 4.2f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "yellowYellow") { phase3 = false; Invoke("SetPhase4", 0.1f); } } // 4. Phase mit 2 Tropfenspawns, speechbubble rot // Invoke mit kleinem delay damit doppelter Tropfenspawn ausgeschlossen ist if (phase4 == true) { dropPrefab = Instantiate(dropYellow, new Vector3(4.7f, 1.8f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropRed, new Vector3(3.5f, 3.6f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "redYellow" || turtleBehaviour.GetColor() == "redGreen") { phase4 = false; Invoke("SetPhase5", 0.1f); } } // 5. Phase mit 2 Tropfenspawns, speechbubble rot if (phase5 == true) { dropPrefab = Instantiate(dropGreen, new Vector3(2.6f, 4.1f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropRed, new Vector3(-1.2f, 3.0f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "redRed") { phase5 = false; Invoke("SetPhase6", 0.1f); } } // 6. Phase mit 2 Tropfenspawns, speechbubble gruen if (phase6 == true) { dropPrefab = Instantiate(dropGreen, new Vector3(-5.2f, 1.5f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropRed, new Vector3(-2.2f, 3.2f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "greenRed" || turtleBehaviour.GetColor() == "greenYellow") { phase6 = false; Invoke("SetPhase7", 0.1f); } } // 7. Phase mit 2 Tropfenspawns, speechbubble gruen if (phase7 == true) { dropPrefab = Instantiate(dropRed, new Vector3(-1.2f, 3.0f, 0.0f), Quaternion.identity) as GameObject; dropPrefab = Instantiate(dropGreen, new Vector3(2.6f, 4.1f, 0.0f), Quaternion.identity) as GameObject; if (turtleBehaviour.GetColor() == "greenGreen") { phase7 = false; CancelInvoke(); phaseEnd = true; } } }