예제 #1
0
        public void RegisterNotifBehavior(IBoardNotifBehavior notifBehavior)
        {
            CardBoardLevel ownerLevel = this.ownerLevelNode as CardBoardLevel;

            notifBehavior.NodeLevel = ownerLevel;
            ownerLevel.BoardNotifLayer.NotifBehaviorsList.Add(notifBehavior);
        }
예제 #2
0
        protected virtual void OnNotifBehaviorStarted(IBoardNotifBehavior obj)
        {
            this.IsRunningBehavior = true;

            if (obj.IsThereBehaviorLabel)
            {
                this.effectBehaviorLabel2D.ActiveLabel(obj);

                if (obj is ACardNotifBehavior)
                {
                    this.effectBehaviorLabel2D.Label = (obj as ACardNotifBehavior).NbBehaviorUse;
                }
            }

            if (obj.IsThereEndButton == false)
            {
                this.endTurnButton.DeactiveButton();
            }
            else
            {
                if (this.endTurnButton.IsActive)
                {
                    this.endTurnButton.SetParagraph(1);
                }
                else
                {
                    this.endTurnButton.ActiveButton(1);
                }
            }
        }
예제 #3
0
 protected virtual void OnNotifBehaviorEnded(IBoardNotifBehavior obj)
 {
     lock (this.objectLock)
     {
         this.CurrentActiveBehavior = null;
     }
 }
예제 #4
0
        protected override void OnNotifBehaviorEnded(IBoardNotifBehavior obj)
        {
            this.IsRunningBehavior = false;

            if (obj.IsThereBehaviorLabel)
            {
                this.effectBehaviorLabel2D.DeactiveLabel();
            }
        }
예제 #5
0
        protected virtual void OnNotifBehaviorStarted(IBoardNotifBehavior obj)
        {
            lock (this.objectLock)
            {
                if (obj.IsThereBehaviorLabel)
                {
                    ACardNotifBehavior cardNotifBehavior = obj as ACardNotifBehavior;

                    this.CurrentActiveBehavior = new ActiveCardBehavior(cardNotifBehavior.GetType(), cardNotifBehavior.NbBehaviorUse, cardNotifBehavior.StateValue, cardNotifBehavior.OwnerCardEntity.Card.Name);
                }
            }
        }
예제 #6
0
        protected override void OnNotifBehaviorStarted(IBoardNotifBehavior obj)
        {
            this.IsRunningBehavior = true;

            if (obj.IsThereBehaviorLabel)
            {
                this.effectBehaviorLabel2D.ActiveLabel(obj);

                if (obj is ACardNotifBehavior)
                {
                    this.effectBehaviorLabel2D.Label = (obj as ACardNotifBehavior).NbBehaviorUse;
                }
            }
        }
예제 #7
0
        protected virtual void OnNotifBehaviorEnded(IBoardNotifBehavior obj)
        {
            this.IsRunningBehavior = false;

            if (obj.IsThereBehaviorLabel)
            {
                this.effectBehaviorLabel2D.DeactiveLabel();
            }

            if (this.endTurnButton.IsActive == false)
            {
                this.endTurnButton.ActiveButton(0);
            }
            else
            {
                this.endTurnButton.SetParagraph(0);
            }
        }
예제 #8
0
        public void ActiveLabel(IBoardNotifBehavior behavior)
        {
            Type behaviorType = behavior.GetType();

            if (this.idLabelToIndex.ContainsKey(behaviorType))
            {
                this.UpdateTextOfParagraph(2, this.idLabelToIndex[behaviorType]);

                //this.SpriteColor = new Color(0, 0, 0, 0);

                this.IsActive = true;

                this.PlayAnimation(0);
            }

            Player behaviorOwner = behavior.OwnerCardEntity.Card.CurrentOwner;

            this.textParagraph2Ds[0].UpdateParameterText(0, textParagraphFactory.IdToTexts[behavior.OwnerCardEntity.Card.NameIdLoc]);

            this.textParagraph2Ds[1].UpdateParameterColor(0, behaviorOwner.PlayerColor);
            this.textParagraph2Ds[1].UpdateParameterText(0, behaviorOwner.PlayerName);
        }