Beispiel #1
0
def attachPchangChunks(model, worldDir, worldPos, triangleFlags, number):
    global pchangChunkSystem
    global pchangChunkModel
    if pchangChunkSystem == None:
        pchangChunkSystem = particles.createDirectedChunks()
        pchangChunkModel = None
    if pchangChunkModel:
        pchangChunkModel.root.detach(pchangChunkSystem)
    pchangChunkModel = model
    if pchangChunkSystem != None:
        model.root.attach(pchangChunkSystem)
        pchangChunkSystem.explicitDirection = worldDir
        pchangChunkSystem.explicitPosition = worldPos
        pchangChunkSystem.action(SOURCE_PSA).force(number)
        BigWorld.callback(pchangChunkSystem.action(SINK_PSA).maximumAge + 0.1, partial(detachPchangChunks, model))
    return
def attachPchangChunks(model, worldDir, worldPos, triangleFlags, number):
    global pchangChunkSystem
    global pchangChunkModel
    if pchangChunkSystem == None:
        pchangChunkSystem = particles.createDirectedChunks()
        pchangChunkModel = None
    if pchangChunkModel:
        pchangChunkModel.root.detach(pchangChunkSystem)
    pchangChunkModel = model
    if pchangChunkSystem != None:
        model.root.attach(pchangChunkSystem)
        pchangChunkSystem.explicitDirection = worldDir
        pchangChunkSystem.explicitPosition = worldPos
        pchangChunkSystem.action(SOURCE_PSA).force(number)
        BigWorld.callback(pchangChunkSystem.action(SINK_PSA).maximumAge + 0.1, partial(detachPchangChunks, model))
    return