Example #1
0
        public bool UnPickCard()
        {
            if (this.CardEntityPicked != null)
            {
                CardEntity cardEntity = this.CardEntityPicked;

                if (cardEntity.ParentStar != null)
                {
                    IAnimation positionAnimation = new PositionAnimation(cardEntity.Position, cardEntity.ParentStar.Position, Time.FromSeconds(1f), AnimationType.ONETIME, InterpolationMethod.SQUARE_DEC);

                    cardEntity.PlayAnimation(positionAnimation);

                    this.CardEntityPicked = null;

                    return(false);
                }
                else
                {
                    this.RemoveEntityFromLayer(cardEntity);

                    this.CardEntityPicked = null;

                    return(true);
                }
            }

            return(false);
        }