コード例 #1
0
        private void InitializeZoomVSLabelRunning()
        {
            if (this.ownerName != null)
            {
                foreach (KeyValuePair <string, ScoreDomainPlayerLabel2D> keyValuePair in this.playerNameToScoreDomain2D)
                {
                    if (keyValuePair.Key == this.ownerName)
                    {
                        keyValuePair.Value.PlayAnimation(0);
                    }
                    else
                    {
                        keyValuePair.Value.PlayAnimation(1);
                    }
                }

                this.ActiveOnlyParagraph(0);

                this.zoomState = ZoomVSState.LABELS_RUNNING;
            }
            else
            {
                this.zoomState = ZoomVSState.STOP;
            }

            if (this.parentLayer.TryGetTarget(out ALayer2D layer2D))
            {
                (layer2D as BoardBannerLayer2D).OnDomainEvaluationFinished(this.ownerName);
            }
        }
コード例 #2
0
        public ScoreDomainLabel2D(ALayer2D parentLayer, Player player1, Player player2)
            : base(parentLayer)
        {
            this.ownerName        = null;
            this.isTemporaryOwner = false;
            this.zoomState        = ZoomVSState.STOP;

            this.Canevas = new IntRect(0, 0, 500, 200);

            this.CreateTextParagraph2D(new Vector2f(0, 0), new Vector2f(0, 0), TextParagraph2D.Alignment.CENTER, 20);
            this.CreateTextParagraph2D(new Vector2f(0, 50), new Vector2f(0, 0), TextParagraph2D.Alignment.CENTER, 60);
            this.UpdateTextOfParagraph(0, "score_domain_label");
            this.UpdateTextOfParagraph(1, "score_domain_vs");


            this.CreateTextParagraph2D(new Vector2f(0, 100), new Vector2f(0, 0), TextParagraph2D.Alignment.LEFT, 20);
            this.CreateTextParagraph2D(new Vector2f(0, 100), new Vector2f(0, 0), TextParagraph2D.Alignment.RIGHT, 20);

            SequenceAnimation sequence = new SequenceAnimation(Time.FromSeconds(4), AnimationType.ONETIME);

            IAnimation anim = new ColorAnimation(new Color(0, 0, 0, 0), new Color(0, 0, 0, 255), Time.FromSeconds(2f), AnimationType.ONETIME, InterpolationMethod.LINEAR);

            sequence.AddAnimation(0.001f, anim);

            anim = new ZoomAnimation(2, 1, Time.FromSeconds(4f), AnimationType.ONETIME, InterpolationMethod.LINEAR);
            sequence.AddAnimation(0, anim);
            this.animationsList.Add(sequence);

            anim = new ColorAnimation(new Color(0, 0, 0, 255), new Color(0, 0, 0, 0), Time.FromSeconds(1f), AnimationType.ONETIME, InterpolationMethod.LINEAR);
            this.animationsList.Add(anim);

            this.InitializeScoreDomainLabel(parentLayer, player1, player2);
            this.Position = new Vector2f(0, 0);

            this.IsActive = false;
        }
コード例 #3
0
 private void InitializeZoomVSStop()
 {
     this.zoomState = ZoomVSState.STOP;
 }
コード例 #4
0
 private void InitializeZoomVSRunning()
 {
     this.zoomState = ZoomVSState.RUNNING;
 }