override public void init() { base.init(); mBackground = new CSprite(); mBackground.setImage(Resources.Load <Sprite> ("Sprites/ui/menu/fondo")); mBackground.setXY(0, 0); mBackground.setSortingLayerName("Background"); mBackground.setName("background"); mButtonPlay = new CButtonSprite("Play"); mButtonPlay.setFrames(Resources.LoadAll <Sprite>("Sprites/ui/menu/button")); mButtonPlay.setName("PlayImage"); mButtonPlay.setXY(CGameConstants.SCREEN_WIDTH / 2 + 700, CGameConstants.SCREEN_HEIGHT / 2 - 150); mButtonPlay.setScale(500); exitButton = new CButtonSprite("Exit"); exitButton.setFrames(Resources.LoadAll <Sprite>("Sprites/ui/menu/button")); exitButton.setName("ExitImage"); exitButton.setXY(mButtonPlay.getX(), CGameConstants.SCREEN_HEIGHT / 3 * 2 - 10); logo = new CText(" "); logo.setXY(CGameConstants.SCREEN_WIDTH / 2, CGameConstants.SCREEN_HEIGHT / 4 * 1); logo.setFontSize(1000f); logo.setPivot(0.5f, 0.5f); logo.setWidth(CGameConstants.SCREEN_WIDTH); logo.setAlignment(TMPro.TextAlignmentOptions.Center); }
override public void init() { base.init(); mBackground = new CSprite(); mBackground.setImage(Resources.Load <Sprite> ("Sprites/menu/menu_background")); mBackground.setXY(0, 0); mBackground.setSortingLayerName("Background"); mBackground.setName("background"); mButtonPlay = new CButtonSprite(); mButtonPlay.setFrames(Resources.LoadAll <Sprite> ("Sprites/ui")); mButtonPlay.gotoAndStop(1); mButtonPlay.setXY(CGameConstants.SCREEN_WIDTH / 2, CGameConstants.SCREEN_HEIGHT / 2); mButtonPlay.setWidth(190); mButtonPlay.setHeight(50); mButtonPlay.setSortingLayerName("UI"); mBackground.setName("button"); }