IEntityReplicationFilter

IEntityReplicationFilter lets you determine whether the entity should replicate to the specific connection.

public class EnemyController : Bolt.EntityEventListener<IEnemyTest>, Bolt.IEntityReplicationFilter
{
    /**
     * Filters out any package to be 
     * sent to a target connection
     * @param  connection Target player connection
     * @return            True if the target connection should 
     *                    receive updates from this entity
     */
    public bool AllowReplicationTo(BoltConnection connection)
    {
        return (myDistance < 1000f);
    }
}

ドキュメントのトップへ戻る