/// <summary>
    /// Handle how a piece dies.
    /// </summary>
    private void PieceDied()
    {
        //_Died = true;

        // TEmpory ***************
        gameObject.SetActive(false);
        gameObject.transform.position = new Vector3(1000, 1000, 1000); // move piece away from board;
        DeathHandler.Invoke(this);
    }
Exemplo n.º 2
0
 private void Death()
 {
     OnDeath?.Invoke();
 }
Exemplo n.º 3
0
 // Poor Snake died in a horrible way!
 public void OnSnakeDeath( )
 {
     Snake.Alive = false;
     DeathHandler?.Invoke(this, new EventArgs());   // Fire an event (SnakeWindow will care )
 }
 private void Die()
 {
     DeathHandler?.Invoke(gameObject);
 }