protected virtual void NewGame()
 {
     pairNum     = (row - 2) * (col - 2) / 2;
     this.matrix = CoreGame.CreateMatrix(row, col);
     if (CoreGame.GetAvailablePair(this.matrix).Count == 0)
     {
         ResetMap();
     }
     gameStrategy = StrategyFactory.CreateInstance(GetGameStrategy(level));
     mapUI.Initialize(matrix, this, (GameStrategy)level);
     remainTime = matchTime;
 }
Ejemplo n.º 2
0
        public override void Initialize(Microsoft.Xna.Framework.Content.ContentManager content)
        {
            base.Initialize(content);
            FarWorld world = new FarWorld();

            scene = new GameScene(world, Content);

            locationText.Initialize(Content);
            locationText.Text = "NONE";

            ArrowScroll a = new ArrowScroll();

            a.Initialize(Content);
            a.Right = false;
            scene.AddNode(a);


            a = new ArrowScroll();
            a.Initialize(Content);
            scene.AddNode(a);


            map = new MapUI();
            map.Initialize(Content);

            scene.AddNode(map);


            Components.Add(scene);


            for (int i = 0; i < ChicksnVixensGame.Get.locationOrder.Count; i++)
            {
                worldLocations.Add(ChicksnVixensGame.Get.locationOrder[i]);
            }

            BlankNess faderInner = new BlankNess();

            faderInner.Initialize(Content);

            faderInner.fullBlankity = 1.0f;
            faderInner.fadeInTimer  = 1.0f;
            faderInner.fadeSpeed    = 2.0f;
            faderInner.RaiseFlag(Flags.FADE_OUT);
            Components.Add(faderInner);


            locked = new MenuObj("ui/ui");
            locked.Initialize(content);
            locked.CreateFramesFromXML("ui/ui_frames");
            locked.CurrentFrame = "lock";
            locked.ResetDimensions();
            locked.UniformScale = ScaleFactor * 2.0f;
            locked.Position     = Vector2.Zero;
            locked.Colour       = new Color(0, 0, 0, 0);
            Components.Add(locked);

            EventManager.Get.SendImmediateEvent(new NewLocationSelected());

            string location = worldLocations[curLocation];

            Cam.TargetPos   = map.GetLocation(location);
            Cam.targetScale = 2;
            Cam.LevelSelect = false;
        }
Ejemplo n.º 3
0
        public override void Initialize(Microsoft.Xna.Framework.Content.ContentManager content)
        {
            base.Initialize(content);
            FarWorld world = new FarWorld();
            scene = new GameScene(world, Content);

            locationText.Initialize(Content);
            locationText.Text = "NONE";

            ArrowScroll a = new ArrowScroll();
            a.Initialize(Content);
            a.Right = false;
            scene.AddNode(a);

            a = new ArrowScroll();
            a.Initialize(Content);
            scene.AddNode(a);

            map = new MapUI();
            map.Initialize(Content);

            scene.AddNode(map);

            Components.Add(scene);

            for (int i = 0; i < ChicksnVixensGame.Get.locationOrder.Count; i++)
            {
                worldLocations.Add(ChicksnVixensGame.Get.locationOrder[i]);
            }

            BlankNess faderInner = new BlankNess();
            faderInner.Initialize(Content);

            faderInner.fullBlankity = 1.0f;
            faderInner.fadeInTimer = 1.0f;
            faderInner.fadeSpeed = 2.0f;
            faderInner.RaiseFlag(Flags.FADE_OUT);
            Components.Add(faderInner);

            locked = new MenuObj("ui/ui");
            locked.Initialize(content);
            locked.CreateFramesFromXML("ui/ui_frames");
            locked.CurrentFrame = "lock";
            locked.ResetDimensions();
            locked.UniformScale = ScaleFactor * 2.0f;
            locked.Position = Vector2.Zero;
            locked.Colour = new Color(0, 0, 0, 0);
            Components.Add(locked);

            EventManager.Get.SendImmediateEvent(new NewLocationSelected());

            string location = worldLocations[curLocation];

            Cam.TargetPos = map.GetLocation(location);
            Cam.targetScale = 2;
            Cam.LevelSelect = false;
        }