/// <summary> /// Constructs a new gem. /// </summary> public Gem(Level level, Vector2 position) { this.level = level; this.basePosition = position; LoadContent(); }
public MovingTile(Level level, int index, Vector2 basePosition, Orientation type) { this.level = level; this.position = basePosition; this.dirType = type; LoadContent(index); }
private bool onTop; // 0 - Down and Back 1 - Top and Front #endregion Fields #region Constructors public Bubble(Level level, Vector2 position, bool onTop, bool playPick) : base(level, position) { PowerIndex = 2; this.onTop = onTop; velocity = Vector2.Zero; this.playPick = playPick; LoadContent(); }
public OzoneTile(Level level, Vector2 position, char type) { this.position = position; this.OriginalGlow = this.IsGlowing = type == '0' ? false : true; this.isStatic = type == '2' ? true : false; blockOFF = level.Content.Load<Texture2D>("Tiles/Ozone0"); blockON = level.Content.Load<Texture2D>("Tiles/Ozone1"); blockSTATIC = level.Content.Load<Texture2D>("Tiles/Ozone2"); }
public BreakableTile(Level level, Point basePosition) { this.position = basePosition; State = PowerState.Ground; this.block0 = level.Content.Load<Texture2D>("Tiles/" + level.LevelIndex.ToString() + "_BlockA0"); this.block1 = level.Content.Load<Texture2D>("Tiles/" + level.LevelIndex.ToString() + "_BlockA1"); this.overlay0 = level.Content.Load<Texture2D>("Tiles/BreakOverlay0"); this.overlay1 = level.Content.Load<Texture2D>("Tiles/BreakOverlay1"); }
public Info(Level level, string message, Vector2 position) { this.level = level; this.Message = message; this.position = position; this.radius = 20; State = PowerState.Ground; LoadContent(); }
/// <summary> /// Constructs a new Animal. /// </summary> public Animal(Level level, Vector2 position, string spriteSet, bool isFloating, bool isLazy, int playerDamage) { this.level = level; this.position = position; this.isFloating = isFloating; this.isLazy = isLazy; PlayerDamage = playerDamage; LoadContent(spriteSet); }
public SlidingPuzzleBlock(Level level,Vector2 position, char number) { this.position = oriPosition = position; this.blockNumber = number - '0'; this.destPositon = Level.InvalidPositionVector; State = PowerState.Ground; //if (this.blockNumber == 0) { puzzlePosition = position; State = PowerState.Pick; return; } texture = level.Content.Load<Texture2D>("SlidingPuzzle/" + number); }
/// <summary> /// Constructs a new Enemy. /// </summary> public Enemy(Level level, Vector2 position, string spriteSet, Orientation orientation, bool isPollutant, int contactDamage) { this.level = level; this.position = position; this.orientation = orientation; hurtTime = 0.0f; IsPollutant = isPollutant; PlayerDamage = contactDamage; PowerUpDamage = health = (float)contactDamage / 10; PointValue = contactDamage * 5; LoadContent(spriteSet); }
public BeanSeed(Level level, Vector2 position, bool playPick) : base(level, position) { PowerIndex = 1; Damage = 1f; this.playPick = playPick; LoadContent(); }
public RecycleBall(Level level, Vector2 position, bool playPick) : base(level, position) { PowerIndex = 3; Damage = 1.5f; health = 20000f; this.playPick = playPick; LoadContent(); }
private void LoadNextLevel(bool newLoading) { // Find the path of the next level. string levelPath; // Loop here so we can try again when we can't find a level. while (true) { // Try to find the next level. They are sequentially numbered txt files. levelPath = String.Format("Levels/{0}.txt", ++levelIndex); levelPath = Path.Combine(StorageContainer.TitleLocation, "Content/" + levelPath); if (File.Exists(levelPath)) break; // If there isn't even a level 0, something has gone wrong. if (levelIndex == 0) throw new Exception("No levels found."); // Load main menu screen LoadingScreen.Load(ScreenManager, false, null, new BackgroundScreen(), new MainMenuScreen()); return; } // Unloads the content for the current level before loading the next one. if (level != null) { // save score and powerUps before loading Level is Disposed if (newLoading) { totalScore = level.Score; for (int i = 0; i < 4; i++) { level.selectedPowerUpIndex = i; powerUpPicked[i] = level.SelectedPowerUpPicked; } } level.Dispose(); } // Load the level. level = new Level(ScreenManager.Game.Services, levelPath, levelIndex, totalScore, powerUpPicked); exitTime = MaxExitTime; startTime = MaxStartTime; tempHealth = level.Player.CurrentHealth; }
public PowerUp(Level level, Vector2 position) { this.Level = level; this.State = PowerState.Ground; this.position = position; }
public Marble(Level level, Vector2 position, bool playPick) : base(level, position) { PowerIndex = 0; Damage = 0.4f; health = 0.1f; this.playPick = playPick; LoadContent(); }
/// <summary> /// Constructors a new /// </summary> public Player(Level level, Vector2 position) { this.level = level; CurrentHealth = MaxHealth; Direction = FaceDirection.Left; LoadContent(); Reset(position); }