Пример #1
0
        public override void AddFire()
        {
            SpriteMap spriteMap = new SpriteMap("surfaceFire", 16, 10);

            spriteMap.AddAnimation("idle", 0.2f, true, 0, 1, 2, 3);
            spriteMap.SetAnimation("idle");
            spriteMap.center = new Vec2(8f, 10f);
            spriteMap.frame  = Rando.Int(3);
            this._surfaceFire.Add(spriteMap);
        }
        public UIMatchmakingBox(UIMenu openOnClose, float xpos, float ypos, float wide = -1f, float high = -1f)
            : base("", xpos, ypos, wide, high)
        {
            this._openOnClose = openOnClose;
            Graphics.fade     = 1f;
            this._frame       = new Sprite("online/matchmakingBeta");
            this._frame.CenterOrigin();
            this._font              = new BitmapFont("biosFontUI", 8, 7);
            this._fancyFont         = new FancyBitmapFont("smallFont");
            this._matchmakingSignal = new SpriteMap("online/matchmakingSignal", 4, 9);
            this._matchmakingSignal.CenterOrigin();
            SpriteMap spriteMap1 = new SpriteMap("online/matchmakingStar", 7, 7);

            spriteMap1.AddAnimation("flicker", 0.08f, true, 0, 1, 2, 1);
            spriteMap1.SetAnimation("flicker");
            spriteMap1.CenterOrigin();
            this._signalCrossLocal = new SpriteMap("online/signalCross", 5, 5);
            this._signalCrossLocal.AddAnimation("idle", 0.12f, true, new int[1]);
            this._signalCrossLocal.AddAnimation("flicker", 0.12f, false, 1, 2, 3);
            this._signalCrossLocal.SetAnimation("idle");
            this._signalCrossLocal.CenterOrigin();
            this._signalCrossNetwork = new SpriteMap("online/signalCross", 5, 5);
            this._signalCrossNetwork.AddAnimation("idle", 0.12f, true, new int[1]);
            this._signalCrossNetwork.AddAnimation("flicker", 0.12f, false, 1, 2, 3);
            this._signalCrossNetwork.SetAnimation("idle");
            this._signalCrossNetwork.CenterOrigin();
            this._matchmakingStars.Add(spriteMap1);
            SpriteMap spriteMap2 = new SpriteMap("online/matchmakingStar", 7, 7);

            spriteMap2.AddAnimation("flicker", 0.11f, true, 0, 1, 2, 1);
            spriteMap2.SetAnimation("flicker");
            spriteMap2.CenterOrigin();
            this._matchmakingStars.Add(spriteMap2);
            SpriteMap spriteMap3 = new SpriteMap("online/matchmakingStar", 7, 7);

            spriteMap3.AddAnimation("flicker", 0.03f, true, 0, 1, 2, 1);
            spriteMap3.SetAnimation("flicker");
            spriteMap3.CenterOrigin();
            this._matchmakingStars.Add(spriteMap3);
            SpriteMap spriteMap4 = new SpriteMap("online/matchmakingStar", 7, 7);

            spriteMap4.AddAnimation("flicker", 0.03f, true, 0, 1, 2, 1);
            spriteMap4.SetAnimation("flicker");
            spriteMap4.CenterOrigin();
            this._matchmakingStars.Add(spriteMap4);
        }
 public override void Initialize()
 {
     base.Initialize();
     sprite.SetAnimation("animation");
 }