sascsacas
This commit is contained in:
parent
0a9f39dbb1
commit
b5224f10aa
1 changed files with 7 additions and 27 deletions
|
@ -193,19 +193,9 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
||||||
if (!isUping)
|
if (!isUping)
|
||||||
{
|
{
|
||||||
StartCicycleAnimation("playerShootRight");
|
StartCicycleAnimation("playerShootRight");
|
||||||
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
Bullet bullet = new Bullet(new Vector2(Pos.X + 16, Pos.Y));
|
||||||
if (targets.Count() > 0)
|
bullet.ShootRight();
|
||||||
{
|
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 12, Pos.Y - 8));
|
||||||
Zombie targetZombie = (Zombie)targets.First();
|
|
||||||
targetZombie.TakeDamage();
|
|
||||||
}
|
|
||||||
targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(GetShootRectangle(isRight), typeof(SilasHands)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
|
||||||
if (targets.Count() > 0)
|
|
||||||
{
|
|
||||||
SilasHands targetHand = (SilasHands)targets.First();
|
|
||||||
targetHand.TakeDamage();
|
|
||||||
}
|
|
||||||
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X + 30, Pos.Y + 7));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -219,20 +209,10 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
||||||
{
|
{
|
||||||
if (!isUping)
|
if (!isUping)
|
||||||
{
|
{
|
||||||
StartCicycleAnimation("playerShootLeft");
|
StartCicycleAnimation("playerShootBoomUpLeft");
|
||||||
var targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(new Rectangle((int)Pos.X, (int)(Pos.Y - 10f), shootLength + 24, 10), typeof(Zombie)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
Bullet bullet = new Bullet(new Vector2(Pos.X, Pos.Y));
|
||||||
if (targets.Count() > 0)
|
bullet.ShootLeft();
|
||||||
{
|
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 6, Pos.Y - 7));
|
||||||
Zombie targetZombie = (Zombie)targets.First();
|
|
||||||
targetZombie.TakeDamage();
|
|
||||||
}
|
|
||||||
targets = AppManager.Instance.GameManager.physicsManager.CheckRectangle(GetShootRectangle(isRight), typeof(SilasHands)).OrderBy(x => (x.Pos - Pos).LengthSquared());
|
|
||||||
if (targets.Count() > 0)
|
|
||||||
{
|
|
||||||
SilasHands targetHand = (SilasHands)targets.First();
|
|
||||||
targetHand.TakeDamage();
|
|
||||||
}
|
|
||||||
SmokeAfterShoot smokeAfterShoot = new SmokeAfterShoot(new Vector2(Pos.X - 12, Pos.Y + 7));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue