Update double input issues, pigman is no longer unbound, limit his weapon access too
This commit is contained in:
@@ -57,6 +57,17 @@ namespace Minigames.FortFight.Projectiles
|
||||
public Vector2 LaunchDirection { get; protected set; }
|
||||
public float LaunchForce { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Player index who owns this projectile (0 = Player 1, 1 = Player 2/AI)
|
||||
/// Used to determine if player input should be accepted for ability activation
|
||||
/// </summary>
|
||||
public int OwnerPlayerIndex { get; private set; } = -1;
|
||||
|
||||
/// <summary>
|
||||
/// Whether this projectile is controlled by AI
|
||||
/// </summary>
|
||||
public bool IsAIControlled { get; private set; } = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Timeout
|
||||
@@ -116,6 +127,17 @@ namespace Minigames.FortFight.Projectiles
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the owner of this projectile (used to control ability activation)
|
||||
/// </summary>
|
||||
/// <param name="playerIndex">Player index (0 or 1)</param>
|
||||
/// <param name="isAI">Whether this projectile is controlled by AI</param>
|
||||
public void SetOwner(int playerIndex, bool isAI)
|
||||
{
|
||||
OwnerPlayerIndex = playerIndex;
|
||||
IsAIControlled = isAI;
|
||||
}
|
||||
|
||||
internal override void OnManagedAwake()
|
||||
{
|
||||
base.OnManagedAwake();
|
||||
|
||||
Reference in New Issue
Block a user