Пример #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());
    }