private void ConfigureGameStart() { currentScoreCounter.ResetScore(); flagSpawner.RandomlyPlaceFlag(); reloadLauncher.RaiseEvent(); currentAcceleration.Variable = launchBallSettings.StartAcceleration; gameStatus = GameStatus.Started; }
// public GameObject GameOverScreen; private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { Debug.Log("feafgewa"); Time.timeScale = 0f; GameOverEvent.RaiseEvent(); } }
private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag == "Player") { Debug.Log("Collided"); OnPickup(); } if (collision.gameObject.tag == "EditorOnly") { Debug.Log("Go"); Time.timeScale = 0f; GameOverEvent.RaiseEvent(); } }
private void OnCollisionEnter2D(Collision2D collision) { Debug.Log($"Ball registered collision: {collision.transform.name}"); gameObject.SetActive(false); if (collision.transform.GetComponent <Hole>() != null) { BallGotIntoHole.RaiseEvent(); return; } BallMissed.RaiseEvent(); }
public void OnPointerUp() { buttonUp.RaiseEvent(); }
public void OnPointerDown() { buttonDown.RaiseEvent(); }
public void OnRestartButtonClick() { restart.RaiseEvent(); Destroy(gameObject); }