Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Net;
- using System.Windows;
- //using System.Windows.Input;
- using HexaLinesWP7.ScreenManagement;
- using Microsoft.Xna.Framework;
- using System.Collections.Generic;
- using Microsoft.Xna.Framework.Input.Touch;
- using Microsoft.Xna.Framework.Graphics;
- using Microsoft.Xna.Framework.Content;
- using HexaLinesWP7.GameObjects;
- using HexaLinesWP7.Drawer3D;
- namespace HexaLinesWP7.ScreenLayers
- {
- /// <summary>
- /// Objekt herního GUI
- /// - pro vykreslení "další buňky", skóre apod. potřebuje také vidět na objekt herního plánu (gameData)
- /// - ten je vytvářen v objektu GamePlan, je si ho nutné odsud vytáhnout pomocí SetGameDataReference()
- /// </summary>
- public class GameOverlay : GraphicalLayer, ITouchLayer, ITiltLayer
- {
- GameOverlayDrawer drawer;
- public event ChangeScreenHandler ChangeScreen;
- public ChangeScreenHandler RememberedChScrHandler { get; set; }
- public GameOverlay(GraphicsDevice device, ContentManager content)
- : base(device, content)
- {
- drawer = new GameOverlayDrawer(device, content);
- }
- /// <summary>
- /// Metoda je volána až poté, co GamePlan.Initialize = při zobrazování okna a spouštění nové hry...
- /// </summary>
- public override void Initialize()
- {
- drawer.Initialize();
- }
- public override void LoadContent()
- {
- drawer.LoadContent();
- // Načte obrázky a data potřebná pro vykreslení herního GUI
- }
- public void PrepareForNewGame(GameData gameData, CellDrawer cellDrawer)
- {
- drawer.PrepareForNewGame(gameData, cellDrawer);
- }
- public override void Update(float elapsedMs)
- {
- }
- public override void Draw(float elapsedMs)
- {
- drawer.Draw(elapsedMs);
- }
- public override void ChangeOrientation(DisplayOrientation displayOrientation)
- {
- }
- public override void RecalculateScreenResolution()
- {
- drawer.RecalculateScreenResolution();
- }
- public void HandleTouch(List<TouchLocation> availableTLs, List<int> usedTouchIDs)
- {
- }
- public void HandleTilt()
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment