add() публичный Метод

Add a FlxObject to the group
public add ( FlxBasic Object ) : FlxBasic
Object FlxBasic
Результат FlxBasic
Пример #1
0
        public override void create()
        {
            base.create();

            houseBases  = new FlxGroup();
            houseRooves = new FlxGroup();

            FlxG.bgColor = FlxColor.INDIGO;

            p = new Player(200, 200);
            add(p.footsteps);

            blackout = new FlxSprite();
            blackout.makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
            blackout.visible = false;
            add(blackout);

            add(houseBases);

            add(p);

            add(houseRooves);

            house1 = new Building(0, 0, 600, 600, p, blackout);
            houseBases.add(house1);
            houseRooves.add(house1.roof);

            FlxG.camera.follow(p, FlxCamera.STYLE_TOPDOWN);
        }
Пример #2
0
        public override void create()
        {
            base.create();

            houseBases = new FlxGroup();
            houseRooves = new FlxGroup();

            FlxG.bgColor = FlxColor.INDIGO;

            p = new Player(200, 200);
            add(p.footsteps);

            blackout = new FlxSprite();
            blackout.makeGraphic(FlxG.width, FlxG.height, FlxColor.BLACK);
            blackout.visible = false;
            add(blackout);

            add(houseBases);

            add(p);

            add(houseRooves);

            house1 = new Building(0, 0, 600, 600, p, blackout);
            houseBases.add(house1);
            houseRooves.add(house1.roof);

            FlxG.camera.follow(p, FlxCamera.STYLE_TOPDOWN);
        }