예제 #1
0
        private void InitTurnIndicator()
        {
            Sprite_Animate_Simple indicator = new Sprite_Animate_Simple();

            indicator.LoadContent("Indicator_Triangle", 4, 1);
            indicator.Depth    = 1;
            indicator.Position = new Vector2((spriteBoard.ViewportWidth - indicator.ViewportWidth) / 2,
                                             (spriteBoard.ViewportHeight - indicator.ViewportHeight) / 2);
            Vector2 p1 = new Vector2(324, 0);
            Vector2 p2 = new Vector2(36, 0);

            RegisterAnimation("P12", new SpriteAnimation_Move(indicator, p1, p2, 1, 100));
            RegisterAnimation("P21", new SpriteAnimation_Move(indicator, p2, p1, 1, 100));
            AddEntity(indicator);

            RegisterAnimation("indicatorFadeIn", new SpriteAnimation_Fade(indicator, 0, 100), "24", FireTime.AtEnd);
            RegisterAnimation("indicatorMove", new SpriteAnimation_Move(indicator, indicator.Position, TripleTriadGame.PlayerTurn == 1 ? p1 : p2, 1, 100), "indicatorFadeIn", FireTime.AtEnd);
            RegisterAnimation("indicatorScale", new SpriteAnimation_Scale(indicator, 1, 100, 1f, 24f / 64), "indicatorMove", FireTime.AtStart);
        }
        private void InitTurnIndicator()
        {
            Sprite_Animate_Simple indicator = new Sprite_Animate_Simple();
            indicator.LoadContent("Indicator_Triangle", 4, 1);
            indicator.Depth = 1;
            indicator.Position = new Vector2((spriteBoard.ViewportWidth - indicator.ViewportWidth) / 2,
                                            (spriteBoard.ViewportHeight - indicator.ViewportHeight) / 2);
            Vector2 p1 = new Vector2(324, 0);
            Vector2 p2 = new Vector2(36, 0);
            RegisterAnimation("P12", new SpriteAnimation_Move(indicator, p1, p2, 1, 100));
            RegisterAnimation("P21", new SpriteAnimation_Move(indicator, p2, p1, 1, 100));
            AddEntity(indicator);

            RegisterAnimation("indicatorFadeIn", new SpriteAnimation_Fade(indicator, 0, 100), "24", FireTime.AtEnd);
            RegisterAnimation("indicatorMove", new SpriteAnimation_Move(indicator, indicator.Position, TripleTriadGame.PlayerTurn == 1 ? p1 : p2, 1, 100), "indicatorFadeIn", FireTime.AtEnd);
            RegisterAnimation("indicatorScale", new SpriteAnimation_Scale(indicator, 1, 100, 1f, 24f / 64), "indicatorMove", FireTime.AtStart);
        }