mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-14 09:03:46 +00:00
FPS counter
This commit is contained in:
parent
a9abec3573
commit
d25696425b
6 changed files with 48 additions and 21 deletions
|
|
@ -93,11 +93,10 @@ public partial class Bullet : Area2D
|
|||
|
||||
public virtual void RotateBullet(float degrees)
|
||||
{
|
||||
SetRotationDegrees(RotationDegrees + degrees);
|
||||
// float radians = Mathf.DegToRad(degrees);
|
||||
// _direction = _direction.Rotated(radians).Normalized(); // Rotate direction
|
||||
// SetRotation(Rotation + radians);
|
||||
//Rotation = radians;
|
||||
//SetRotationDegrees(RotationDegrees + degrees);
|
||||
float radians = Mathf.DegToRad(degrees);
|
||||
_direction = _direction.Rotated(radians).Normalized(); // Rotate direction
|
||||
SetRotation(Rotation + radians);
|
||||
}
|
||||
|
||||
public virtual void RotateSpriteDegrees(float degrees)
|
||||
|
|
|
|||
11
Scripts/Utils/FpsCounterLabel.cs
Normal file
11
Scripts/Utils/FpsCounterLabel.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
using Godot;
|
||||
|
||||
namespace Cirno.Scripts.Utils;
|
||||
|
||||
public partial class FpsCounterLabel : Label
|
||||
{
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
this.Text = Engine.GetFramesPerSecond().ToString();
|
||||
}
|
||||
}
|
||||
1
Scripts/Utils/FpsCounterLabel.cs.uid
Normal file
1
Scripts/Utils/FpsCounterLabel.cs.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cwd3sksjqpuy3
|
||||
Loading…
Add table
Add a link
Reference in a new issue