Ejemplo n.º 1
0
    void Start()
    {
        // Add systems here
        TouchSystem ts = new TouchSystem();

        AddSystem(ts);

        AnimationSystem ans = new AnimationSystem();

        AddSystem(ans);
        UISystem uis = new UISystem();

        AddSystem(uis);
        PauseSystem ps = new PauseSystem();

        AddSystem(ps);
        DestroySystem ds = new DestroySystem();

        AddSystem(ds);

        AdSystem ads = new AdSystem();

        AddSystem(ads);

        Enable();
        ExtraSetup();
    }
Ejemplo n.º 2
0
        protected override void Draw(GameTime dt)
        {
            if (drawer == null)
            {
                drawer = new TextDrawer("font");
                drawer.Initialize(Content);
            }
            ScreenManager.Get.Draw();
            base.Draw(dt);

            spriteBatch.Begin();
            int milliSeconds = watch.Elapsed.Milliseconds;

            drawer.Text   = ((int)(1000.0f / watch.ElapsedMilliseconds)).ToString();
            drawer.Text   = ((int)(1000.0f / dt.ElapsedGameTime.Milliseconds)).ToString();
            drawer.DrawIn = BaseSprite.DrawSpace.SCREENSPACE;
            drawer.PosX   = 0.1f;
            drawer.PosY   = 0.1f;
            //drawer.Draw();
            watch.Stop();
            watch.Reset();
            spriteBatch.End();


            AdSystem.Draw();
        }
Ejemplo n.º 3
0
    public void NextPuzzle()
    {
        if (currentPuzzleIterator < PuzzleList.Count - 1)
        {
            currentPuzzleIterator++;

            var puzzleToInstantiate = PuzzleList[currentPuzzleIterator];
            CurrentPuzzleName = puzzleToInstantiate.PuzzleName;
            //winDialog.transform.Find("CanvasGroup").gameObject.SetActive(false);
            InstantiatePuzzleInGameWorld(puzzleToInstantiate);

            if (puzzleBeaten)
            {
                if (AdSystem.ShouldWeShowAd(CurrentPuzzleCategory))
                {
                    GameObject.Find("AdController").GetComponent <InterstitialAdScript>().LaunchInterstitalAd();
                }
            }

            ResetLevelToDefaults();
        }
        else if (puzzleBeaten && currentPuzzleIterator == PuzzleList.Count - 1)       // Just beat the last puzzle of the category, send them back to category menu.
        {
            PlayerPrefs.SetString("MenuToShow", "PuzzleCategorySelectorCanvas");
            SceneManager.LoadScene("Main");
        }
    }
Ejemplo n.º 4
0
        protected override void Update(GameTime dt)
        {
            watch.Start();
            Jabber.Util.EventManager.Get.Update(dt);
            InputManager.Get.Update(dt);
            ScreenManager.Get.Update(dt);
            //Jabber.Util.EventManager.Get.Update(dt);

            base.Update(dt);


            AdSystem.Update(dt);
        }
Ejemplo n.º 5
0
    void Start()
    {
        // Add systems here
        LivesSystem ls = new LivesSystem();

        AddSystem(ls);
        StreakSystem ss = new StreakSystem();

        AddSystem(ss);
        ScoreSystem scs = new ScoreSystem();

        AddSystem(scs);
        ColoringSystem cs = new ColoringSystem();

        AddSystem(cs);
        TouchSystem ts = new TouchSystem();

        AddSystem(ts);
        GameSystem gs = new GameSystem();

        AddSystem(gs);
        TutorialSystem tus = new TutorialSystem();

        AddSystem(tus);

        AnimationSystem ans = new AnimationSystem();

        AddSystem(ans);
        UISystem uis = new UISystem();

        AddSystem(uis);
        PauseSystem ps = new PauseSystem();

        AddSystem(ps);
        DestroySystem ds = new DestroySystem();

        AddSystem(ds);

        AdSystem ads = new AdSystem();

        AddSystem(ads);

        Enable();
        this.initializeGame = true;
        ExtraSetup();
    }
Ejemplo n.º 6
0
 protected override void Initialize()
 {
     base.Initialize();
     AdSystem.Initialize();
 }