private void ConfigureGameStart()
    {
        currentScoreCounter.ResetScore();

        flagSpawner.RandomlyPlaceFlag();

        reloadLauncher.RaiseEvent();

        currentAcceleration.Variable = launchBallSettings.StartAcceleration;

        gameStatus = GameStatus.Started;
    }
Beispiel #2
0
 // public GameObject GameOverScreen;
 private void OnCollisionEnter2D(Collision2D collision)
 {
     if (collision.gameObject.tag == "Player")
     {
         Debug.Log("feafgewa");
         Time.timeScale = 0f;
         GameOverEvent.RaiseEvent();
     }
 }
Beispiel #3
0
 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();
     }
 }
Beispiel #4
0
    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();
    }
Beispiel #5
0
 public void OnPointerUp()
 {
     buttonUp.RaiseEvent();
 }
Beispiel #6
0
 public void OnPointerDown()
 {
     buttonDown.RaiseEvent();
 }
    public void OnRestartButtonClick()
    {
        restart.RaiseEvent();

        Destroy(gameObject);
    }