mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 03:15:55 +00:00
Tutorial
This commit is contained in:
parent
8c3ed1f7c7
commit
b07a8fe60d
33 changed files with 594 additions and 58 deletions
|
|
@ -195,11 +195,17 @@ public partial class GameManager : Node2D
|
|||
CameraTargetObject(_player);
|
||||
}
|
||||
|
||||
public void CameraTargetObject(Node2D target)
|
||||
public void CameraTargetObject(Node2D target, Vector2? offset = null)
|
||||
{
|
||||
if (_cameraTarget is null) return;
|
||||
_cameraTarget.Reparent(target, true);
|
||||
_cameraTarget.GlobalPosition = target.GlobalPosition;
|
||||
|
||||
if (offset.HasValue)
|
||||
{
|
||||
_cameraTarget.Position += offset.Value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SpawnWeapons()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue