Exemplo n.º 1
0
        public override void Create()
        {
            // put some content in the main channel
            var t0 = new TestScaling();
            t0.Create();

            // create a first child channel
            var ch1 = TestFactory.CreateChannel(Color.LightSalmon, 200, 400);
            ch1.GetComponent<WorldComp>().TimeWarp = 0.333;
            ch1.GetComponent<PositionComp>().Position = new Vector2(50f, 50f);

            // second child channel
            var ch2 = TestFactory.CreateChannel(Color.LightSeaGreen, 200, 400);
            ch2.GetComponent<WorldComp>().TimeWarp = 1.0;
            ch2.GetComponent<PositionComp>().Position = new Vector2(300f, 50f);

            // 3rd
            var ch3 = TestFactory.CreateChannel(Color.LightPink, 200, 400);
            ch3.GetComponent<WorldComp>().TimeWarp = 2.0;
            ch3.GetComponent<PositionComp>().Position = new Vector2(550f, 50f);

            // 4th
            var ch4 = TestFactory.CreateChannel(Color.LightGreen, 700, 250);
            ch4.GetComponent<WorldComp>().TimeWarp = 4.0;
            ch4.GetComponent<PositionComp>().Position = new Vector2(50f, 500f);

            // for each channel, built the content into it.
            BuildTo(ch1);
            var t1 = new TestRelativeMotion();
            t1.Create();

            BuildTo(ch2);
            var t2 = new TestRelativeMotion();
            t2.Create();

            BuildTo(ch3);
            var t3 = new TestRelativeMotion();
            t3.Create();

            BuildTo(ch4);
            var t4 = new TestRelativeMotion();
            t4.Create();
        }
Exemplo n.º 2
0
        public override void Create()
        {
            // create an additional child channel that renders onto the main channel
            // content for 1st screen: call upon another unit test
            var t1 = new TestRelativeMotion();
            var ch1 = TestFactory.CreateChannel(Color.White, 800, 400);
            throw new NotImplementedException();

            /*
            //ch1.PostEffects.Add( TTGame.Instance.Content.Load<Effect>("FixedColor") );
            t1.Create();

            // main channel: shows the child channels as sprites
            BuildToDefault();
            var scr1 = TestFactory.CreateSpritelet(ch1);
            scr1.GetComponent<PositionComp>().Position = new Vector2(50f, 50f);
            //scr1.GetComponent<VelocityComp>().Velocity2D = new Vector2(5f, 0.5f);
            */
        }