@prvdmwrong/lifecycles
v0.2.0-rewrite.1
Published
An assortment of useful provider lifecycles for Prvd 'M Wrong.
Readme
More lifecycles for Prvd 'M Wrong
Extends Prvd 'M Wrong with common lifecycle events for player tracking and the runtime.
Includes the following lifecycles:
onPostSimulation(self: Provider<unknown>, deltaTime: number)fires everyRunService.PostSimulationonPreSimulation(self: Provider<unknown>, deltaTime: number)fires everyRunService.PreSimulationonPreAnimation(self: Provider<unknown>, deltaTime: number)fires everyRunService.PreAnimationonPreRender(self: Provider<unknown>, deltaTime: number)fires everyRunService.PreRenderifRunService:IsClientonPlayerAdded(self: Provider<unknown>, newPlayer: Player)fires when a new player joins the game including all existing players whenroot:onStartis calledonPlayerRemoving(self: Provider<unknown>, leavingPlayer: Player)fires when a player leaves the game
This package is intended to be used through root:useProvider:
local prvd = require(ReplicatedStorage.Packages.prvd)
local prvdLifecycles = require(ReplicatedStorage.Packages.prvdLifecycles)
local root = prvd.root()
-- @prvdmwrong/lifecycles returns a provider which can be used:
:useProvider(prvdLifecycles)
-- use your games providers...
:useModules(ServerScriptStorage.Server.Providers:GetDescendants())
:useModules(ReplicatedStorage.Shared.Providers:GetDescendants())
-- start the root!
:start()Learn more in the documentation. This package is part of Prvd 'M Wrong
