public override void OnActivate(GameTime gameTime, Player activatedBy) { _currentWaitTime -= gameTime.ElapsedGameTime.Milliseconds; if (_currentWaitTime < 0) { _currentWaitTime = _maxWaitTime; _projectile = new LinearProjectile(activatedBy.World, this, ProjectileTarget.Enemy, EventType.DoorTrigger, false, 300, CenterEntity(activatedBy), MathHelper.ToRadians((int)activatedBy.CurrentSprite.CurrentAnimation * 90)); _projectile.AnimatedSprites.Add("Normal", AnimatedSprite.Clone()); activatedBy.World.Projectiles.Add(_projectile); } }
public World(ArmorPotionsGame game) { _game = game; _projectiles = new List<Projectile>(); _projectilesToAdd = new List<Projectile>(); _player = new Player(this, _game.Content.Load<Texture2D>(@"Player\PlayerWalking"), _game.Content.Load<Texture2D>(@"Player\SwordAttack")); _player.Position = new Vector2(350, 350); Rectangle clientBounds = _game.Window.ClientBounds; _camera = new Camera(_game, 0, 0, clientBounds.Width, clientBounds.Height, 1f); _game.Components.Add(_camera); MaxTileWidth = clientBounds.Width / Tile.Width; MaxTileHeight = clientBounds.Height / Tile.Height; }
public override void CollectedBy(Player player) { player.Inventory.PermaQuips.Add(this); }
public abstract void ActivatedBy(Player player);
public abstract void CollectedBy(Player player);
public override void OnUnEquip(Player removedBy) { }
public override void OnEquip(Player equippedBy) { }
public abstract void OnUnEquip(Player removedBy);
public abstract void OnEquip(Player equippedBy);
public abstract void OnActivate(GameTime gameTime, Player activatedBy);
public abstract void ConsumedBy(Player player);