7-31-25 @ 3:05AM
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Runtime;
|
||||
|
||||
/// TODO create a few types of balls
|
||||
public partial class Ball : RigidBody2D
|
||||
{
|
||||
|
||||
[Signal]
|
||||
public delegate void OnHoverEventHandler(Ball HOVEREDBALL, bool TF);
|
||||
[Signal]
|
||||
public delegate void OnCollisionEventHandler(Ball TARGET);
|
||||
[Signal]
|
||||
@@ -18,20 +19,6 @@ public partial class Ball : RigidBody2D
|
||||
public float _moveThreshold = 5.0f;
|
||||
public Vector2 _newPosition = new Vector2(-1, -1);
|
||||
|
||||
|
||||
public static Ball _Create()
|
||||
{
|
||||
PackedScene scene = ResourceLoader.Load<PackedScene>("res://Gameplay/ball.tscn");
|
||||
Ball newBall = scene.Instantiate<Ball>();
|
||||
|
||||
return newBall;
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void _Process(double DELTA_)
|
||||
{
|
||||
if (LinearVelocity.Length() > 0 && LinearVelocity.Length() < _moveThreshold)
|
||||
@@ -105,6 +92,7 @@ public partial class Ball : RigidBody2D
|
||||
if (_active)
|
||||
{
|
||||
_hovered = true;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user