You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
627 B
21 lines
627 B
using Godot; |
|
|
|
public class Camera : Camera2D |
|
{ |
|
public Cursor Cursor { get; private set; } |
|
|
|
public override void _EnterTree() |
|
{ |
|
// Cursor = GetViewport().GetNode<Cursor>("Cursor"); |
|
} |
|
|
|
public override void _Process(float delta) |
|
{ |
|
// TODO: Implement some kind of "zoom" mechanic? |
|
// var mousePos = GetTree().Root.GetMousePosition(); |
|
// var centerPos = OS.WindowSize / 2; |
|
// var scale = ((Viewport)GetViewport()).Scale; |
|
// Position = !Cursor.Visible ? Vector2.Zero |
|
// : ((mousePos - centerPos) / scale).Clamped(MaxDistance) / 2; |
|
} |
|
}
|
|
|