public void Drop() { position = holder.Position + new Vector2(0, 2f); velocity = TKMath.GetAngleVector(90 + ((float)Map.rng.NextDouble() - 0.5f) * 70f) * 20f; holder = null; }
public DashTarget(Vector2 a, Vector2 b) { startPosition = a; endPosition = b; angle = TKMath.GetAngle(a, b); }
public void Rotate(Vector2 origin, float delta) { float currentAngle = TKMath.GetAngle(position - origin) + delta; RotateTo(origin, currentAngle); }
public void RotateTo(Vector2 origin, float angle) { float distance = (position - origin).Length; position = origin + TKMath.GetAngleVector(angle) * distance; }
public virtual void Hit(Actor a) { Hit(a.Position); a.Hit(damage, TKMath.GetAngle(velocity), this); }