private void OnTriggerEnter2D(Collider2D coll) { if (coll.transform.CompareTag("Player")) { PlayerHpPointBar.OnAddPoint(-1); RemoveThisBullet(); } else if (coll.transform.CompareTag("Wall")) { RemoveThisBullet(); } }
private void OnTriggerEnter2D(Collider2D coll) { if (coll.CompareTag("Ball")) { Debug.Assert(playerHp != null, "NullReference"); Boss boss = FindObjectOfType <Boss>(); boss.ballPool.reset(); boss.SpawnBall(); CameraShake.OnShake(0.3f, 0.1f); PlayerHpPointBar.OnAddPoint(-1); //playerHp.AddPoint(-1); //if (playerHp.IsDead()) //{ // //GameSystem.Instance.OnGameOver?.Invoke(); //} } }