7-15-25@3:02am
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Data;
|
||||
|
||||
public partial class Ball : RigidBody2D
|
||||
{
|
||||
@@ -26,9 +27,7 @@ public partial class Ball : RigidBody2D
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
SetProcess(false);
|
||||
_placed = false;
|
||||
_available = false;
|
||||
_available = true;
|
||||
_hovered = false;
|
||||
_selected = false;
|
||||
_aimed = false;
|
||||
@@ -53,28 +52,26 @@ public partial class Ball : RigidBody2D
|
||||
}
|
||||
}
|
||||
|
||||
if (!Globals.Instance._anyMovement)
|
||||
{
|
||||
if (!_available)
|
||||
{
|
||||
_available = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
if (Globals.Instance._anyMovement)
|
||||
{
|
||||
if (_available)
|
||||
{
|
||||
_available = false;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (!_available)
|
||||
{
|
||||
_available = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Place(Vector2 POSITION)
|
||||
{
|
||||
_placed = true;
|
||||
Position = POSITION;
|
||||
SetProcess(true);
|
||||
}
|
||||
|
||||
private void OnMouseEntered()
|
||||
|
||||
Reference in New Issue
Block a user