Exemplo n.º 1
0
        public override IObject2D CreateObject2D(World2D world2D, IObject obj)
        {
            if (obj is ImageBackgroundLayer)
            {
                ImageBackgroundLayer imageBackgroundLayer = obj as ImageBackgroundLayer;

                return(new ImageBackgroundLayer2D(world2D, this, imageBackgroundLayer));
            }

            return(null);
        }
Exemplo n.º 2
0
        public override void VisitStart(World world)
        {
            base.VisitStart(world);

            this.backgroundLayer = world.LoadedLayers["slidesLayer"] as ImageBackgroundLayer;

            this.currentRulesPhase = RulesPhase.SLIDE1;
            this.backgroundLayer.PreInitImageId = this.phaseToImageIds[this.currentRulesPhase];

            world.InitializeLevel(new List <string>()
            {
                "slidesLayer"
            }, this);
        }
Exemplo n.º 3
0
        public override void VisitStart(World world)
        {
            base.VisitStart(world);

            BackgroundLayer      background      = new BackgroundLayer();
            ImageBackgroundLayer imageBackground = new ImageBackgroundLayer();

            BoardGameLayer boardGameLayer = new BoardGameLayer();

            boardGameLayer.ParentLayer = background;

            BoardPlayerLayer     boardPlayerLayer   = new BoardPlayerLayer();
            BoardPlayerLayer     boardOpponentLayer = new BoardPlayerLayer();
            MenuBoardPlayerLayer menuPlayerLayer    = new MenuBoardPlayerLayer();

            BoardNotifLayer     boardNotifLayer     = new BoardNotifLayer();
            MenuBoardNotifLayer menuBoardNotifLayer = new MenuBoardNotifLayer();

            BoardBannerLayer bannerLayer = new BoardBannerLayer();

            MenuTextLayer menuTextLayer = new MenuTextLayer();

            menuTextLayer.ParentLayer = background;

            world.InitializeWorld(new List <Tuple <string, ALayer> >()
            {
                new Tuple <string, ALayer>("backgroundLayer", background),
                new Tuple <string, ALayer>("slidesLayer", imageBackground),
                new Tuple <string, ALayer>("menuTextLayer", menuTextLayer),
                new Tuple <string, ALayer>("gameLayer", boardGameLayer),
                new Tuple <string, ALayer>("playerLayer", boardPlayerLayer),
                new Tuple <string, ALayer>("opponentLayer", boardOpponentLayer),
                new Tuple <string, ALayer>("menuPlayerLayer", menuPlayerLayer),
                new Tuple <string, ALayer>("notifLayer", boardNotifLayer),
                new Tuple <string, ALayer>("menuNotifLayer", menuBoardNotifLayer),
                new Tuple <string, ALayer>("bannerLayer", bannerLayer)
            });

            this.nextLevelNodeName = "StartPageLevel";
            this.UpdateCurrentLevelNode(world);
        }