Beispiel #1
0
        public GameUI(CurrentChampionState ccs, PingCounter ping, GameScore score)
        {
			ChampionState = ccs;

			UIFPSCounter = new FPSCounter();
			AddChild(UIFPSCounter,2);
			UIPingCounter = ping;
			AddChild(UIPingCounter,2);

			/*Map = new DrawableImage("UIObjects/map");
			AddChild(Map);*/
			SpellBackground = new DrawableImage("UIObjects/spellBackground");
			AddChild(SpellBackground);

			LifeDropshadow = new DrawableImage("UIObjects/lifeDrop");
			LifeDropshadow.RelativeOrigin = new Vector2(0f,1f);
			AddChild(LifeDropshadow);
			ResourceDropShadow = new DrawableImage("UIObjects/manaDrop");
			ResourceDropShadow.RelativeOrigin = new Vector2(0f,1f);
			//AddChild(ResourceDropShadow);

			Life = new DrawableImage("UIObjects/life");
			Life.RelativeOrigin = new Vector2(0f,1f);
			AddChild(Life);
			Resource = new DrawableImage("UIObjects/mana");
			Resource.RelativeOrigin = new Vector2(0f,1f);
			//AddChild(Resource);

			ScoreBackground = new DrawableImage("UIObjects/boxBackground");
			AddChild(ScoreBackground);
			MoneyBackground = new DrawableImage("UIObjects/boxBackground");
			AddChild(MoneyBackground);
			/*ObjectBackground = new DrawableImage("UIObjects/boxBackground");
			AddChild(ObjectBackground);*/


			UISpellMenu = new SpellMenu(ChampionState);
			AddChild(UISpellMenu,3);

			GameScore = score;
        }
        public GameplayScreen(ContentManager content, Game game, Client client)
			: base(content, game)
        {
			Client = client;
			ChampionsInfo = new ChampionsInfo();

			GameTime = null;
			TimeSinceLastInputSent = 0.0;

			Match = new GameMatch(Path.Combine("Content", MapLoader.MAIN_MAP_PATH));
			LastStateUpdateData = new List<StateUpdateData>();
			RemarkableEvents = new List<RemarkableEventData>();
			Spells = new Dictionary<ulong, DrawableSpell>();
			TimeOfLastStateUpdate = 0.0;
			Champions = new List<ClientChampion>();

			GameWorld = new Container();
			Structures = new List<DrawableStructure>();

			Camera = new CameraService();
			Services.AddService(typeof(CameraService), Camera);

			((SoundService)Services.GetService(typeof(SoundService))).CameraService = Camera;

			Parallax = new Parallax();

			KillDisplay = new KillDisplay(ChampionsInfo);

			GameScore = new GameScore();

			Sound = (SoundService)Services.GetService(typeof(SoundService));
        }