Ejemplo n.º 1
0
 public bool Intersects(CollisionSphere sphere)
 {
     return(MyMath.Distance(this.Center, sphere.Center) < this.Radius + sphere.Radius);
 }
Ejemplo n.º 2
0
 public void CollidedWith(IColloidableObject colloidableObject)
 {
     MyContentManager.Sound_Explosion.Play(Math.Max(0, 0.1f - MyMath.Distance(gameWorld.CameraPosition, gamePosition) / 4000.0f / 10));
     gameWorld.Add(new BulletExplosion(gameWorld, gamePosition, Energy));
     dead = true;
 }
Ejemplo n.º 3
0
 public void RotataeAndMove(Vector2 velocity)
 {
     this.velocity = MyMath.LimitVelocity(velocity, 80f) / 5;
     Rotate(MyMath.GetAngle(velocity));
     gamePosition += this.velocity;
 }