Verse Library verse

03 Fragment

Initializes the device, subscribes to spawner events, and maintains a persistent loop.

verse-library/triad-infiltration-making-players-invisible-in-verse/03-fragment.verse

OnBegin<override>()<suspends> : void =
        # Wait one frame for the game to finish setting up
        Sleep(0.0)

        # Subscribe to each spawner's SpawnedEvent so we know
        # when a player arrives on the stage
        for (Spawner : PlayerSpawners):
            Spawner.SpawnedEvent.Subscribe(OnPlayerSpawned)

        # Keep the device running forever
        loop:
            Sleep(0.1)

Comments

    Sign in to vote, comment, or suggest an edit. Sign in