private void Execute(UndoPieceMoved msg) { if (msg.Piece == gameObject) { transform.localPosition = new Vector3(msg.From.X, msg.From.Y, transform.localPosition.z); Message.Publish(new PieceDeselected()); Message.Publish(new PieceSelected(gameObject)); } }
private void Execute(UndoPieceMoved msg) { if (msg.Piece == gameObject) { transform.localPosition = new Vector3(msg.From.X, msg.From.Y, transform.localPosition.z); Message.Publish(new PieceDeselected()); Message.Publish(new PieceSelected(gameObject)); if (_previousFacings.Count > 0) { SetRotationInstant(_previousFacings.Pop()); } } }