public void schildHit() { if (lastPlayer != null) { Destroy(schild.gameObject); schild = null; lastPlayer.playerGetSchild(); Invoke("spawnSchild", getRandomNum(10, 16)); } }
private void spawnPowerUp(int powerUpIndex) { float posX = getRandomNum(-3, 4); float posY = getRandomNum(-3, 4); if (powerUpIndex == 0) { laser = Instantiate(laserPrefab, new Vector3(posX, posY, 0), Quaternion.identity); } else if (powerUpIndex == 1) { schild = Instantiate(schildPrefab, new Vector3(posX, posY, 0), Quaternion.identity); } }
public SchildSituation(Aktion Aktion, Schild Schild, CharakterMan Charakter) : base(Aktion, " mit " + Schild.SchreibName, Charakter) { this.Schild = Schild; }