Пример #1
0
 private void OnCardAwakened(CardEntityAwakenedDecorator obj)
 {
     if (obj != null)
     {
         this.CardAwakened = this.objectToObject2Ds[obj] as CardEntityAwakenedDecorator2D;
     }
     else
     {
         this.CardAwakened = null;
     }
 }
Пример #2
0
        public override IObject2D CreateObject2D(World2D world2D, ALayer2D layer2D, IObject obj)
        {
            if (obj is CardEntityAwakenedDecorator)
            {
                CardEntityAwakenedDecorator entity = obj as CardEntityAwakenedDecorator;

                return(new CardEntityAwakenedDecorator2D(this, layer2D, entity));
            }

            return(null);
        }
Пример #3
0
 private void OnCardAwakened(CardEntityAwakenedDecorator obj)
 {
     lock (this.objectLock)
     {
         if (obj != null)
         {
             this.CardAwakened = this.objectToObjectAIs[obj] as AICardEntity;
         }
         else
         {
             this.CardAwakened = null;
         }
     }
 }
Пример #4
0
        //protected override AEntity2D AddEntity(AEntity obj)
        //{
        //    AEntity2D entity2D = base.AddEntity(obj);

        //    return entity2D;
        //}

        protected override void OnEntityPropertyChanged(AEntity obj, string propertyName)
        {
            base.OnEntityPropertyChanged(obj, propertyName);

            switch (propertyName)
            {
            case "Value":
                CardEntityAwakenedDecorator2D cardConcerned2D = this.objectToObject2Ds[obj] as CardEntityAwakenedDecorator2D;
                CardEntityAwakenedDecorator   cardConcerned   = (obj as CardEntityAwakenedDecorator);

                cardConcerned2D.CardValue         = cardConcerned.Card.Value;
                cardConcerned2D.CardValueModifier = cardConcerned.Card.ValueModifier;
                break;
            }
        }
Пример #5
0
        //protected override void ShowCardLabel()
        //{
        //    this.cardLabel.ShowInstantLabel();
        //}

        public CardEntityAwakenedDecorator2D(IObject2DFactory factory, ALayer2D layer2D, CardEntityAwakenedDecorator entity)
            : base(factory, layer2D, entity)
        {
            //SequenceAnimation sequence = new SequenceAnimation(Time.FromSeconds(4), AnimationType.ONETIME);

            this.starEffect2D  = new StarEffect2D(this.Card2DFactory, layer2D, this);
            this.beamsEffect2D = new BeamsEffect2D(this.Card2DFactory, layer2D, this);

            this.initialPosition = entity.ParentStar.Position;

            this.cardValue         = entity.Card.Value;
            this.cardValueModifier = entity.Card.ValueModifier;

            //IAnimation animation = new ColorAnimation(new Color(255, 255, 255, 0), new Color(255, 255, 255, 255), Time.FromSeconds(2), AnimationType.ONETIME, InterpolationMethod.LINEAR);
            ////sequence.AddAnimation(0, animation);
            //this.animationsList.Add(animation);

            //animation = new ColorAnimation(new Color(255, 255, 255, 255), new Color(this.PlayerColor.R, this.PlayerColor.G, this.PlayerColor.B, 0), Time.FromSeconds(2), AnimationType.ONETIME, InterpolationMethod.LINEAR);
            ////sequence.AddAnimation(3, animation);
            ////flipAnimation.AddAnimation(0, animation);
            //this.animationsList.Add(animation);

            this.DecoratorState = CardDecoratorState.FINISHED;
        }