// Update is called once per frame private void Update() { int waren = lkw.getInhaltCount(); if (waren >= 5) { if (theRechnung == null) { theRechnung = Instantiate(CubeObject, transform.position, transform.rotation); } else { return; } } else if (waren < 5) { clone = GameObject.FindGameObjectWithTag("Rechnung"); DestroyImmediate(clone, true); } }
void Update() { int score = lkw.getInhaltCount(); textComponent.text = "Paletten im Lkw : " + score; }