public SnakePiece(Transform transform) { this.transform = transform; location = transform.Location.AsPoint(); }
public Food(double aliveTime, Transform transform) { this.transform = transform; this.aliveTime = aliveTime; }
private void MoveTo(Point newLocation) { Tail?.MoveTo(location); location = newLocation; transform = transform.Move(() => location.AsVector2()); hasMoved = true; }