Beispiel #1
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));
        }
Beispiel #2
0
 public KillDisplay(ChampionsInfo championsInfo)
 {
     AddChild(Panel = new Container());
     Kills          = new List <Kill>();
     KillsToBeAdded = new List <Kill>();
     KillsToRemove  = new List <Kill>();
     ChampionsInfo  = championsInfo;
 }
Beispiel #3
0
 public TestScreen(ContentManager content, Game game) : base(content, game)
 {
     ChampionsInfo = new ChampionsInfo();
 }
Beispiel #4
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;
            }