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); }
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); }