private void Update() { if (!coinActive) { FindPlayArea.setCoin1Bounds(); base.transform.position = location; } }
public void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "Coin1") { FindPlayArea.setCoin1Bounds(); ScoreBehaviour.score += 200f; CoinManager.sprites += 1000; //source.PlayOneShot(spriteCollect, 1f); RespawnCoin1.coinActive = false; } else if (col.gameObject.tag == "Laser") { Player.gameOver = true; } else { Player.gameOver = false; } }