public Player(AdventureMap Owner, Vector2[] ArrayVertex, int MaxWidth, int MaxHeight) { this.Owner = Owner; HP = 100; CollisionBox = new CollisionObject <Player>(ArrayVertex, MaxWidth, MaxHeight); }
public Bullet(AdventureMap Owner, Vector2[] ArrayVertex, int MaxWidth, int MaxHeight) { this.Owner = Owner; CollisionBox = new CollisionObject <Bullet>(ArrayVertex, MaxWidth, MaxHeight); ListAttackedRobots = new List <Player>(); Damage = 5; }
public Bomb(AdventureMap Owner, Vector2 StartingPoint) { this.Owner = Owner; Vector2[] LocalPoints = new Vector2[4] { new Vector2(StartingPoint.X - Size, StartingPoint.Y - Size), new Vector2(StartingPoint.X - Size, StartingPoint.Y + Size), new Vector2(StartingPoint.X + Size, StartingPoint.Y + Size), new Vector2(StartingPoint.X + Size, StartingPoint.Y - Size), }; CollisionBox = new CollisionObject <Bomb>(LocalPoints, 32, 32); SecondsBeforeExplosion = 5; }
public SimpleLinearExplosion(AdventureMap Owner, Vector2 StartingPoint, Vector2 Speed) { this.Owner = Owner; this.Speed = Speed; Vector2[] LocalPoints = new Vector2[4] { new Vector2(StartingPoint.X - Size, StartingPoint.Y - Size), new Vector2(StartingPoint.X - Size, StartingPoint.Y + Size), new Vector2(StartingPoint.X + Size, StartingPoint.Y + Size), new Vector2(StartingPoint.X + Size, StartingPoint.Y - Size), }; CollisionBox = new CollisionObject <SimpleLinearExplosion>(LocalPoints, 32, 32); //Going Left if (Speed.X < 0) { IndexForwardLeftVector = 1; IndexBackLeftVector = 2; IndexForwardRightVector = 0; IndexBackRightVector = 3; } //Going Right else if (Speed.X > 0) { IndexForwardLeftVector = 3; IndexBackLeftVector = 0; IndexForwardRightVector = 2; IndexBackRightVector = 1; } //Going Up else if (Speed.Y < 0) { IndexForwardLeftVector = 0; IndexBackLeftVector = 1; IndexForwardRightVector = 3; IndexBackRightVector = 2; } //Going Down else if (Speed.Y > 0) { IndexForwardLeftVector = 2; IndexBackLeftVector = 3; IndexForwardRightVector = 1; IndexBackRightVector = 0; } }