private void OnPieceExitCollision(object sender, EventArgs e) { Shape.CollisionEventArgs args = e as Shape.CollisionEventArgs; Shape collisionShape = args.OtherObject.GetComponent <Shape>(); _board.RemoveShapeToCurrentPlayable(collisionShape); }
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); } }