private void ThrowBoomerang() { boomerang = new BoomerangProjectile(direction, this); Util.CenterRelativeToEdge(Sprite.Box, direction, boomerang); projectiles.Add(boomerang); boomerang.Update(); canThrowBoomerang = false; }
public void Execute() { if (!(player.Inventory.Boomerang is EmptyLeveledItem)) { IProjectile proj = new BoomerangProjectile(player.Direction, player); proj.Update(); player.UseProjectile(proj); } }
public Goriya(ICollection <IProjectile> projectiles) { this.projectiles = projectiles; Sprite = EnemySpriteFactory.Instance.CreateRightMovingGoriyaSprite(); direction = "right"; X = 400; Y = 200; Sprite.Position = new Point(X, Y); State = new RightMovingGoriyaState(this); canThrowBoomerang = true; boomerangTimer = new Random().Next(180, THROW_DELAY); boomerang = new BoomerangProjectile(direction, this); currentHearts = 3; }
public ThrownBoomerangState(BoomerangProjectile boom) { this.boom = boom; }
public ReturningBoomerangState(BoomerangProjectile boom) { this.boom = boom; }
public PocketBoomerangState(BoomerangProjectile boom) { this.boom = boom; }
public HoveringBoomerangState(BoomerangProjectile boom) { this.boom = boom; hoverTimer = -HOVER_TIME; }