コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TopTenComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public TopTenComponent(EverLite game)
     : base(game)
 {
     this.game   = game;
     this.volume = VolumeManager.Instance;
     this.sound  = SoundManager.Instance;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public MenuComponent(EverLite game, MenuItemsComponent menuItems)
     : base(game)
 {
     this.game      = game;
     this.menuItems = menuItems;
     this.volume    = VolumeManager.Instance;
     this.sound     = SoundManager.Instance;
 }
コード例 #3
0
ファイル: GameScene.cs プロジェクト: JacksonDorsett/EverLite
 public GameScene(EverLite game, params GameComponent[] components)
 {
     this.game       = game;
     this.components = new List <GameComponent>();
     foreach (GameComponent component in components)
     {
         AddComponent(component);
     }
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CollisionDetector"/> class.
 /// </summary>
 /// <param name="activeEnemies"> reference to list of all active enemies.</param>
 /// <param name="enemyBullets">reference to enemy bullets.</param>
 /// <param name="playerBullets">reference to player bullet.</param>
 /// <param name="player">reference to a current player.</param>
 /// <param name="score">reference to GameScore instance.</param>
 public CollisionDetector(List <LifetimeEntity> activeEnemies, List <Bullet> enemyBullets, List <Bullet> playerBullets, List <Item> items, Player player, EverLite score)
 {
     this.activeEnemies = activeEnemies;
     this.playerBullets = playerBullets;
     this.enemyBullets  = enemyBullets;
     this.items         = items;
     this.player        = player;
     this.scoreKeeper   = score;
     this.sound         = SoundManager.Instance;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SidePanelComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public SidePanelComponent(EverLite game)
     : base(game)
 {
     this.game           = game;
     this.playerSettings = PlayerSettings.Instance;
     this.sidePanel      = this.game.Content.Load <Texture2D>(@"Sprites\background_narrowspace");
     this.highScore      = new HighScore {
         Id = 0, Name = "AAA", Score = 0
     };
     this.volume = VolumeManager.Instance;
 }
コード例 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MenuComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public MenuItemsComponent(EverLite game, Vector2 position, Color itemColor, Color selectedItemColor)
     : base(game)
 {
     this.game              = game;
     this.position          = position;
     this.itemColor         = itemColor;
     this.selectedItemColor = selectedItemColor;
     items         = new List <MenuItem>();
     selectedItem  = null;
     this.textSize = 80;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ScrollingStarsBackgroundComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public ScrollingStarsBackgroundComponent(EverLite game)
     : base(game)
 {
     this.game             = game;
     this.texture          = this.game.Content.Load <Texture2D>(@"Sprites\background_stars");
     this.r1               = this.texture.Bounds;
     this.r2               = this.r1;
     this.r1.Y             = -this.r1.Height;
     this.currentState     = ScrollState.Start;
     this.transformManager = TransformManager.Instance;
 }
コード例 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GameWonComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public GameWonComponent(EverLite game) : base(game)
 {
     this.game      = game;
     this.alphabet1 = this.alphabet2 = this.alphabet3 = new List <string> {
         "A", "B", "C", "D", "E", "F", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "!", "@", "#", "$"
     };
     this.itemColor         = Color.Red;
     this.selectedItemColor = Color.Yellow;
     this.letter1           = this.letter2 = this.letter3 = "A";
     this.listName          = ListName.letters1;
     this.volume            = VolumeManager.Instance;
     this.sound             = SoundManager.Instance;
 }
コード例 #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlayerSettingsComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public PlayerSettingsComponent(EverLite game)
     : base(game)
 {
     this.game           = game;
     this.playerSettings = PlayerSettings.Instance;
     this.volume         = VolumeManager.Instance;
     this.sound          = SoundManager.Instance;
     this.controlList    = new List <string> {
         "Move Up:", "Move Left:", "Move Down:", "Move Right:", "Shoot:", "Use Bomb:", "Slow Down:", "Change Weapon:", "Pause:"
     };
     this.itemColor         = Color.Red;
     this.selectedItemColor = Color.Yellow;
     this.selectedControl   = "Move Up:";
 }
コード例 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanetExplodeBackgroundComponent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public PlanetExplodeBackgroundComponent(EverLite game) : base(game)
 {
     this.game = game;
 }
コード例 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PlanetRingsBackgroundCompnent"/> class.
 /// </summary>
 /// <param name="game">game reference object.</param>
 public PlanetRingsBackgroundCompnent(EverLite game) : base(game)
 {
     this.game = game;
 }
コード例 #12
0
ファイル: Program.cs プロジェクト: JacksonDorsett/EverLite
 static void Main()
 {
     using (var game = new EverLite())
         game.Run();
 }