예제 #1
0
    public static void ReplClearDirty(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        if (replicationComponent == null)
        {
            return;
        }
        replicationComponent.ReplSetDirty(repl_behaviour, false);
    }
예제 #2
0
    public static float ReplGetReplicationInterval(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        if (replicationComponent == null)
        {
            return(0f);
        }
        return(replicationComponent.ReplGetReplicationInterval(ReplTools.GetLocalPeer()));
    }
예제 #3
0
    public static P2PPeer ReplGetOwner(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        if (replicationComponent == null)
        {
            return(null);
        }
        return(replicationComponent.ReplGetOwner());
    }
예제 #4
0
    public static void ReplBlockChangeOwnership(this IReplicatedBehaviour repl_behaviour, bool block)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        if (replicationComponent == null)
        {
            return;
        }
        replicationComponent.ReplBlockChangeOwnership(block);
    }
예제 #5
0
    public static void ReplGiveOwnership(this IReplicatedBehaviour repl_behaviour, P2PPeer peer)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        if (replicationComponent == null)
        {
            return;
        }
        replicationComponent.ReplGiveOwnership(peer);
    }
예제 #6
0
    public static bool ReplIsDirty(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        return(replicationComponent != null && replicationComponent.ReplIsDirty(repl_behaviour));
    }
예제 #7
0
    public static bool ReplIsTransferringOwnership(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        return(replicationComponent != null && replicationComponent.IsTransferringOwnership());
    }
예제 #8
0
    public static bool ReplCanChangeOwnership(this IReplicatedBehaviour repl_behaviour)
    {
        ReplicationComponent replicationComponent = repl_behaviour.GetReplicationComponent();

        return(replicationComponent != null && replicationComponent.ReplCanChangeOwnership());
    }