public void RegisterNotifBehavior(IBoardNotifBehavior notifBehavior) { CardBoardLevel ownerLevel = this.ownerLevelNode as CardBoardLevel; notifBehavior.NodeLevel = ownerLevel; ownerLevel.BoardNotifLayer.NotifBehaviorsList.Add(notifBehavior); }
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); } } }
protected virtual void OnNotifBehaviorEnded(IBoardNotifBehavior obj) { lock (this.objectLock) { this.CurrentActiveBehavior = null; } }
protected override void OnNotifBehaviorEnded(IBoardNotifBehavior obj) { this.IsRunningBehavior = false; if (obj.IsThereBehaviorLabel) { this.effectBehaviorLabel2D.DeactiveLabel(); } }
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); } } }
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; } } }
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); } }
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); }