示例#1
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();
        }
示例#2
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;
            }
        }