Exemple #1
0
    private void OnPieceExitCollision(object sender, EventArgs e)
    {
        Shape.CollisionEventArgs args = e as Shape.CollisionEventArgs;
        Shape collisionShape          = args.OtherObject.GetComponent <Shape>();

        _board.RemoveShapeToCurrentPlayable(collisionShape);
    }
Exemple #2
0
    private void OnPieceCollision(object sender, EventArgs e)
    {
        Shape.CollisionEventArgs args = e as Shape.CollisionEventArgs;
        Shape collisionShape          = args.OtherObject.GetComponent <Shape>();

        if (_board.IsPiecePlayableOnShape(collisionShape, args.CurrentPiece))
        {
            _board.AddShapeToCurrentlyPlayable(collisionShape);
        }
    }