Ejemplo n.º 1
0
        private void DoTest(Test t)
        {
            var c = ChannelMgr.CreateChannel();
            c.Screen.GetComponent<ScreenComp>().BackgroundColor = t.BackgroundColor;

            channels.Add(c);
            t.Initialize(Factory);
            t.Create();

            // add framerate counter
            var col = TTutil.InvertColor(t.BackgroundColor);
            FrameRateCounter.Create(col);

            Factory.CreateTextlet(new Vector2(2f, 750f), t.GetType().Name, col);

        }
Ejemplo n.º 2
0
        protected override void LoadContent()
        {
            base.LoadContent();

            // game channel
            gameChannel = ChannelMgr.CreateChannel();
            ChannelMgr.ZapTo(gameChannel);
            gameChannel.Screen.GetComponent <ScreenComp>().BackgroundColor = Color.Black;
            gameChannel.Screen.GetComponent <ScreenComp>().Zoom            = 2.0f;

            // add framerate counter
            FrameRateCounter.Create(Color.White);

            // create level
            level = new QuestLevel();
            Level.SetCurrentLevel(level);
            level.Init();
        }
Ejemplo n.º 3
0
        protected override void LoadContent()
        {
            base.LoadContent();

            // title channel
            titleChannel = ChannelMgr.CreateChannel();
            ChannelMgr.ZapTo(titleChannel); // TODO function to create on it without seeing it.
            titleChannel.Screen.GetComponent <ScreenComp>().BackgroundColor = Color.Black;

            // add framerate counter
            FrameRateCounter.Create(Color.White);

            var t = Factory.CreateMovingTextlet(new Vector2(0.5f, 0.5f), "Title Screen");

            t.GetComponent <DrawComp>().DrawColor = Color.LightGoldenrodYellow;
            t.GetComponent <ScaleComp>().Scale    = 4;


            // game channel
            gameChannel = ChannelMgr.CreateChannel();
            ChannelMgr.ZapTo(gameChannel);
            gameChannel.Screen.GetComponent <ScreenComp>().BackgroundColor = Color.White;

            // add framerate counter
            FrameRateCounter.Create(Color.Black);

            // add several sprites
            for (float x = 0.1f; x < 1.6f; x += 0.1f)
            {
                for (float y = 0.1f; y < 1f; y += 0.1f)
                {
                    Factory.CreateHyperActiveBall(new Vector2(x, y));
                    Factory.CreateMovingTextlet(new Vector2(x, y), "This is the\nTTengine test. !@#$1234");
                    //break;
                }
                //break;
            }
        }