Exemplo n.º 1
0
			public Kill(ChampionTypes? killer, ChampionTypes? killed, bool FirstIsAlly, ChampionsInfo championsInfo) {
				AddChild(new DrawableImage("UIObjects/killed") {Position = new Vector2(60,0)});

				AddChild(new DrawableImage("UIObjects/deathCircle") {Tint = FirstIsAlly ? Color.Green : Color.Red});
				AddChild(new DrawableImage("UIObjects/innerDeathCircle") {Position = new Vector2(5)});
				AddChild(new DrawableImage("UIObjects/deathCircle") {Position = new Vector2(Width - 80,0),
					Tint = FirstIsAlly ? Color.Red : Color.Green});
				AddChild(new DrawableImage("UIObjects/innerDeathCircle") {Position = new Vector2(Width - 75,5)});

				if(killed == null ) {
					AddChild(new DrawableImage("UIObjects/towerDeath") {Position = new Vector2(Width - 60,12)});
				} else {
					AddChild(new DrawableImage(championsInfo.GetInfo(killed.Value).Portait) {Position = new Vector2(Width-75, 5)});
				}

				if(killer == null ) {
					AddChild(new DrawableImage("UIObjects/towerDeath") {Position = new Vector2(15,12)});
				} else {
					AddChild(new DrawableImage(championsInfo.GetInfo(killer.Value).Portait) {Position = new Vector2(5)});
				}


				MoveFinished = true;
				MoveCounter = 0;
				Timer = new TimeSpan(0,0,DurationShown);
				Remove = RemovingState.Alive;
			}
		public DrawableChampionSprite(ChampionAnimation startAnim, ChampionTypes type, ChampionsInfo championsInfo)
			: base (championsInfo.GetInfo(type).AssetName,
			        championsInfo.GetInfo(type).FrameWidth,
			        championsInfo.GetInfo(type).FrameHeight,
			        championsInfo.GetInfo(type).GetAnimation(startAnim).Line,
			        championsInfo.GetInfo(type).GetAnimation(startAnim).FrameRate,
			        championsInfo.GetInfo(type).GetAnimation(startAnim).FrameCount)
        {
			Information = championsInfo.GetInfo(type);
			CurrentAnimation = startAnim;
        }
Exemplo n.º 3
0
        public DrawableChampion(ChampionT champion, bool ally, ChampionsInfo championsInfo)
        {
            Champion       = champion;
            ChampionSprite = new DrawableChampionSprite(ChampionAnimation.idle, champion.Type, championsInfo);
            ChampionSprite.PlayAnimation(ChampionAnimation.run);
            ChampionSprite.RelativeOrigin = new Vector2(0.5f, 1f);
            ChampionSprite.Position       = new Vector2(Champion.CollisionWidth / 2f, Champion.CollisionHeight);

            LifeBar = new DrawableChampionLifeBar(ally)
            {
                Position  = new Vector2(Champion.CollisionWidth / 2f, -Champion.CollisionHeight / 2f),
                MaxHealth = champion.MaxHealth,
                Health    = champion.Health
            };
        }
 public DrawableChampionSprite(ChampionAnimation startAnim, ChampionTypes type, ChampionsInfo championsInfo)
     : base(championsInfo.GetInfo(type).AssetName,
            championsInfo.GetInfo(type).FrameWidth,
            championsInfo.GetInfo(type).FrameHeight,
            championsInfo.GetInfo(type).GetAnimation(startAnim).Line,
            championsInfo.GetInfo(type).GetAnimation(startAnim).FrameRate,
            championsInfo.GetInfo(type).GetAnimation(startAnim).FrameCount)
 {
     Information      = championsInfo.GetInfo(type);
     CurrentAnimation = startAnim;
 }
Exemplo n.º 5
0
        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));
        }
Exemplo n.º 6
0
		public TestScreen(ContentManager content, Game game) : base(content, game)
        {
			ChampionsInfo = new ChampionsInfo();
        }
Exemplo n.º 7
0
		public KillDisplay(ChampionsInfo championsInfo) {
			AddChild(Panel = new Container());
			Kills = new List<Kill>();
			KillsToBeAdded = new List<Kill>();
			KillsToRemove = new List<Kill>();
			ChampionsInfo = championsInfo;
        }
Exemplo n.º 8
0
 public RemoteDrawableChampion(ChampionSpawnInfo spawnInfo, bool ally, ChampionsInfo champInfo)
     : base(new RemoteClientChampion(spawnInfo), ally, champInfo)
 {
 }
Exemplo n.º 9
0
 public MainDrawableChampion(ChampionSpawnInfo spawnInfo, GameMatch match, ChampionsInfo champInfo)
     : base(new MainClientChampion(spawnInfo, match), true, champInfo)
 {
 }