functions/MiniGameFirework/Start-MiniGameFirework.ps1
|
function Start-MiniGameFirework { <# .SYNOPSIS A function for creating fireworks in the Terminal. .DESCRIPTION A function for creating fireworks in the Terminal. Shoots fireworks in random intervalls. May not work correctly at times. Mainly just testing capabillities of Powershell Terminal. .OUTPUTS *..* *_\/_* '.\'/.' *..* -= o =- .'/.\'. ' = o = . . ^ . ^ .EXAMPLE Start Fireworks with cure hearts only: PS> Start-Fireworks hearts .LINK #> [CmdletBinding( )] param ( # Set the types of fireworks to use. [Parameter( Position = 0 )] [System.String] [ValidateSet( 'hearts', 'normal' )] $FireworkType, # Enables the game sound to be played. [Parameter( Position = 1 )] [switch] $Mute ) $gameSettings = @{ TickSpanMilliseconds = 100 InvertY = $true Mute = $Mute.IsPresent Load = $PSScriptRoot Vars = @{ "firework.type" = $FireworkType Velocity = 1 StageTicks = 5 Intervall = 7 Explosion = @{ Max = 20 Count = -1 } } } $game = New-MiniGame @gameSettings $game.Start() } |