Esempio n. 1
0
        public override void OnStart(Router router, GameBase game, Dictionary <string, object> args)
        {
            ichigo = Texture2D.LoadFrom("ichigo.png");
            Root.Add(container);

            var random = new System.Random(300);

            container.Add(new TextDrawable("O", 32, FontStyle.Normal, Color.White));

            // container.Add(canvas);

            for (var i = 0; i < 8; i++)
            {
                container.Add(new Sprite(ichigo)
                {
                    Location = random.NextVector(game.Width, game.Height),
                    Scale    = Vector.One + random.NextVectorFloat() * 7,
                    Color    = random.NextColor(),
                });
            }

            game.Print("Scroll to move");
            game.Print("Press ↑ to scale up");
            game.Print("Press ↓ to scale down");
            game.Print("Press ESC to return");
        }