コード例 #1
0
ファイル: KillDisplay.cs プロジェクト: DrPandemic/EraParadox
			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;
			}
コード例 #2
0
ファイル: KillDisplay.cs プロジェクト: DrPandemic/EraParadox
            protected override void OnUpdate(Microsoft.Xna.Framework.GameTime dt)
            {
                if (Remove == RemovingState.Alive)
                {
                    Timer -= dt.ElapsedGameTime;

                    if (MoveCounter > 0 && MoveFinished)
                    {
                        StartAction();
                    }

                    if (Timer <= TimeSpan.Zero)
                    {
                        Remove = RemovingState.Disappearing;
                        PerformAction(new ActionFadeTo(new TimeSpan(0, 0, 0, 0, (int)(MovementDuration * 1000)), 0f)
                        {
                            DoneAction = thing => {
                                Remove = RemovingState.Remove;
                            }
                        });
                    }
                }

                base.OnUpdate(dt);
            }
コード例 #3
0
ファイル: KillDisplay.cs プロジェクト: DrPandemic/EraParadox
            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;
            }
コード例 #4
0
ファイル: KillDisplay.cs プロジェクト: DrPandemic/EraParadox
			protected override void OnUpdate(Microsoft.Xna.Framework.GameTime dt)
			{
				if(Remove == RemovingState.Alive) {
					Timer -= dt.ElapsedGameTime;

					if(MoveCounter > 0 && MoveFinished) {
						StartAction();
					}
					
					if (Timer <= TimeSpan.Zero) {
						Remove = RemovingState.Disappearing;
						PerformAction(new ActionFadeTo(new TimeSpan(0,0,0,0,(int)(MovementDuration * 1000)),0f) {DoneAction = thing => {
								Remove = RemovingState.Remove;
							}});
					}
				}

				base.OnUpdate(dt);
			}