Add StickGame Assets

This commit is contained in:
Dzejkobik007
2024-03-24 22:21:16 +01:00
parent 5a5812c0c7
commit 6c8b523d1f
6643 changed files with 596260 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using FishNet.Connection;
using FishNet.Observing;
using UnityEngine;
namespace FishNet.Component.Observing
{
/// <summary>
/// This condition makes an object only visible to the owner.
/// </summary>
[CreateAssetMenu(menuName = "FishNet/Observers/Owner Only Condition", fileName = "New Owner Only Condition")]
public class OwnerOnlyCondition : ObserverCondition
{
/// <summary>
/// Returns if the object which this condition resides should be visible to connection.
/// </summary>
/// <param name="connection">Connection which the condition is being checked for.</param>
/// <param name="currentlyAdded">True if the connection currently has visibility of this object.</param>
/// <param name="notProcessed">True if the condition was not processed. This can be used to skip processing for performance. While output as true this condition result assumes the previous ConditionMet value.</param>
public override bool ConditionMet(NetworkConnection connection, bool currentlyAdded, out bool notProcessed)
{
notProcessed = false;
/* Returning false immediately indicates no connection will
* meet this condition. */
return false;
}
/// <summary>
/// How a condition is handled.
/// </summary>
/// <returns></returns>
public override ObserverConditionType GetConditionType() => ObserverConditionType.Normal;
/// <summary>
/// Clones referenced ObserverCondition. This must be populated with your conditions settings.
/// </summary>
/// <returns></returns>
public override ObserverCondition Clone()
{
OwnerOnlyCondition copy = ScriptableObject.CreateInstance<OwnerOnlyCondition>();
return copy;
}
}
}