Esempio n. 1
0
        public override void Resume()
        {
            GResource.LoadTextures();

            var imageFon = new GImage(Game);

            imageFon.SetTexture(GResource.game_fon);
            imageFon.SetWidth(Game.GetWindowWidth());
            imageFon.SetHeight(Game.GetWindowHeight());
            imageFon.SetX(Game.GetWindowWidth() / 2);
            imageFon.SetY(Game.GetWindowHeight() / 2);
            AddElement(imageFon);

            tree = new ChristmasTree(Game);
            tree.GenerateDecorations(3);

            train = new Train(Game, GResource.train);
            train.Initialize(Game.GetWindowWidth() / 2, 65, 90, 30);
            train.SetChristmasTree(tree);

            cat = new Cat(Game, Game.GetWindowWidth() / 2, Game.GetWindowHeight() / 2, 50, 50);
            cat.AddTextures(GResource.lcat, Cat.STATE.LEFT);
            cat.AddTextures(GResource.rcat, Cat.STATE.RIGHT);
            cat.Bump();
            cat.SetChristmasTree(tree);
            //	AddElement(imageCat);
        }
Esempio n. 2
0
        public override void Resume()
        {
            GResource.LoadTextures();

            imgLMD = new GImage(Game);
            imgLMD.SetTexture(GResource.game_fon);
            imgLMD.SetWidth(250);
            imgLMD.SetHeight(200);
            imgLMD.SetX(Game.GetWindowWidth() / 2);
            imgLMD.SetY(Game.GetWindowHeight() / 2 + 100);
            AddElement(imgLMD);

            CircleButton but = new CircleButton(Game);

            but.onClick += ScreenStart_onClick;
            but.SetX(Game.GetWindowWidth() / 2);
            but.SetY(150);
            but.SetRadius(80);
            but.SetImage(GImage.LoadTexture(@"C:\Users\User\Desktop\WarBugs\button_play.png"));

            GameFramewerk.UI.Animations.AnimationScale anim = new GameFramewerk.UI.Animations.AnimationScale();
            anim.Initialize(but.GetWidth(), but.GetHeight(), but.GetWidth() + 20, but.GetHeight() + 20, 4, 4, but);

            AddElement(but);
        }
Esempio n. 3
0
        public void AddDecoration(float x, float y, float w, float h, uint texture)
        {
            GImage img = new GImage(game);

            img.SetTexture(texture);
            img.SetX(x);
            img.SetY(y);
            img.SetWidth(w);
            img.SetHeight(h);
            img.UserObject = "decoration";
            Decorations.Add(img);
        }
Esempio n. 4
0
 public Train(IGame game, uint texture)
 {
     Image = new GImage(game);
     Image.SetTexture(texture);
 }