public LevelIntro()
        {
            //b1 = new FlxSprite(0, 0);
            //b1.createGraphic(FlxG.width, FlxG.height , Lemonade_Globals.GAMEBOY_COLOR_4);
            //b1.setScrollFactors(0, 0);
            //add(b1);

            //b2 = new FlxSprite(0, 0);
            //b2.createGraphic(FlxG.width, FlxG.height, Lemonade_Globals.GAMEBOY_COLOR_3);
            //b2.setScrollFactors(0, 0);
            //add(b2);

            //b3 = new FlxSprite(0, 0);
            //b3.createGraphic(FlxG.width , FlxG.height, Lemonade_Globals.GAMEBOY_COLOR_2);
            //b3.setScrollFactors(0, 0);
            //add(b3);

            //b4 = new FlxSprite(0, 0);
            //b4.createGraphic(FlxG.width , FlxG.height, Lemonade_Globals.GAMEBOY_COLOR_1);
            //b4.setScrollFactors(0, 0);
            //add(b4);

            block             = new FlxTileblock(0, 0, FlxG.width + 20, FlxG.height + 20);
            block.auto        = FlxTileblock.FRAMENUMBER;
            block.frameNumber = 0;
            block.setScrollFactors(0, 0);
            block.loadTiles(FlxG.Content.Load <Texture2D>("Lemonade/fade"), 20, 20, 0);

            add(block);


            bT1 = new FlxText(0, FlxG.height / 4, FlxG.width);
            bT1.setFormat(null, 3, Lemonade_Globals.GAMEBOY_COLOR_1, FlxJustification.Center, Lemonade_Globals.GAMEBOY_COLOR_3);

            bT1.text = Lemonade_Globals.niceLocationNames[Lemonade_Globals.location];
            add(bT1);

            bT2 = new FlxText(0, (FlxG.height / 4) * 3, FlxG.width);
            bT2.setFormat(null, 2, Lemonade_Globals.GAMEBOY_COLOR_1, FlxJustification.Center, Lemonade_Globals.GAMEBOY_COLOR_3);

            bT2.text = Lemonade_Globals.niceActorNames[Lemonade_Globals.location];
            add(bT2);


            textTween1 = new Tweener(FlxG.height / 4, -95, 1.20f, XNATweener.Elastic.EaseInOut);
            textTween2 = new Tweener((FlxG.height / 4) * 3, FlxG.height + 95, 1.5f, XNATweener.Elastic.EaseInOut);
            textTween3 = new Tweener(-20, FlxG.height / 4, 0.7f, XNATweener.Quintic.EaseOut);
            textTween4 = new Tweener(800, (FlxG.height / 4) * 3, 1.2f, XNATweener.Quintic.EaseOut);

            timer = 0.0f;
        }
Esempio n. 2
0
        override public void create()
        {
            base.create();

            FlxG.playMp3("Lemonade/music/AmbulanceCalls", 0.5f);

            block             = new FlxTileblock(0, 0, FlxG.width + 20, FlxG.height + 20);
            block.auto        = FlxTileblock.FRAMENUMBER;
            block.frameNumber = 6;
            block.setScrollFactors(0, 0);
            block.loadTiles(FlxG.Content.Load <Texture2D>("Lemonade/fade"), 20, 20, 0);

            add(block);

            icons    = new FlxGroup();
            tweeners = new List <Vector3Tweener>();

            for (int i = 0; i < 6; i++)
            {
                int offsetX  = 75;
                int offsetY  = 0;
                int offsetY2 = 0;

                                #if __ANDROID__
                offsetX  = 400;
                offsetY  = 100;
                offsetY2 = 120;
                                #endif

                FlxSprite p1 = new FlxSprite(0 + (i * 36) + offsetX, 12);
                p1.loadGraphic("Lemonade/illustration/people", true, false, 302, 640);
                p1.frame = i;
                icons.add(p1);
                tweeners.Add(new Vector3Tweener(new Vector3(-100 + (i * 36) + offsetX, -290 + offsetY2, 0.1f), new Vector3(12 + offsetY + offsetX, 100, 1), 0.45f, Bounce.EaseOut));
            }

            foreach (var item in tweeners)
            {
                item.Pause();
            }

            add(icons);

            switch (Lemonade_Globals.location)
            {
            case "warehouse":
                selected = 0;
                break;

            case "military":
                selected = 1;
                break;

            case "newyork":
                selected = 2;
                break;

            case "sydney":
                selected = 3;
                break;

            case "management":
                selected = 4;
                break;

            case "factory":
                selected = 5;
                break;

            default:
                selected = 0;
                break;
            }
            tweeners[selected].Play();

            timer = 5.0f;

            t1 = new FlxText(0, FlxG.height - 72, FlxG.width);
            t1.setFormat(null, 2, Lemonade_Globals.GAMEBOY_COLOR_1, FlxJustification.Center, Lemonade_Globals.GAMEBOY_COLOR_4);
            add(t1);

            t2 = new FlxText(0, 3, FlxG.width);
            t2.setFormat(null, 2, Lemonade_Globals.GAMEBOY_COLOR_1, FlxJustification.Center, Lemonade_Globals.GAMEBOY_COLOR_4);
            add(t2);
        }