public bool Collide(CircleCollider other) { Point2D localOrigo = CoordinateSystem.GlobalToLocal(other.Origo); return(Math.Abs(localOrigo.X) < Math.Abs(Width / 2) + other.Radius && Math.Abs(localOrigo.Y) < Math.Abs(Heigth / 2) + other.Radius); }
public bool Collide(CircleCollider other) { return((other.Origo - Origo).Magnitude < Radius + other.Radius); }
public void Move(Vector2D moveVector) { Player.Position = Player.Position + moveVector; collider = new Visualizer2D.CircleCollider(Player.Position, 10.0f); }
public WalkerExit(Visualizer2D.Exit exit) { Collider = new Visualizer2D.CircleCollider(exit.Position, 20.0f); Position = exit.Position; }
public WalkerPlayer(Visualizer2D.Player player) { this.Player = player; collider = new Visualizer2D.CircleCollider(player.Position, 10.0f); }