MORE Camera
This commit is contained in:
18
scenes/main/Camera2d.cs
Normal file
18
scenes/main/Camera2d.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Camera2d : Camera2D
|
||||
{
|
||||
public float zoomSpeed = 0.05f;
|
||||
public float zoomMin = 0.001f;
|
||||
public float zoomMax = 2.0f;
|
||||
public float dragSensitivity = 0.05f;
|
||||
|
||||
|
||||
public override void _Input(InputEvent @event)
|
||||
{
|
||||
base._Input(@event);
|
||||
}
|
||||
|
||||
public static Vector2 Lerp(Vector2 from, Vector2 to, float weight) => from + (to - from) * weight;
|
||||
}
|
||||
Reference in New Issue
Block a user