feat: add initial People Playground mod development kit
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
URL: https://wiki.studiominus.nl/internalReference/ProjectileLauncherBehaviour.html
|
||||
Title: People Playground Modding - ProjectileLauncherBehaviour
|
||||
==================================================
|
||||
|
||||
public class ProjectileLauncherBehaviour
|
||||
Inherits MonoBehaviour, Messages.IUse
|
||||
One of the first behaviours in the game, which explains the odd naming conventions. The behaviour launches a projectile on activation.
|
||||
Fields
|
||||
public Vector2 barrelPosition
|
||||
Local barrel position
|
||||
|
||||
public Vector2 barrelDirection
|
||||
Local barrel direction. Usually (1, 0, 0)
|
||||
|
||||
public GameObject projectilePrefab
|
||||
[SkipSerialisation]
|
||||
Reference to the prefab that is to be launched. Can be null if projectileAsset is set to some asset
|
||||
|
||||
public GameObject muzzleFlashPrefab
|
||||
[SkipSerialisation]
|
||||
The effect to spawn when activated. Can be null
|
||||
|
||||
public SpawnableAsset projectileAsset
|
||||
[SkipSerialisation]
|
||||
Reference to the asset that is to be launched. Can be null if projectileAsset is set to some prefab
|
||||
|
||||
public bool IsAutomatic
|
||||
Does it fire automatically?
|
||||
|
||||
public float AutomaticInterval
|
||||
How much time there is between shots if the launcher is automatic
|
||||
|
||||
public float projectileLaunchStrength
|
||||
The amount of force to launch with
|
||||
|
||||
public float recoilMultiplier
|
||||
The amount of recoil
|
||||
|
||||
public AudioClip launchSound
|
||||
[SkipSerialisation]
|
||||
Reference to the audio clip that is played when something is launched. Can be null if LaunchClips is populated
|
||||
|
||||
public AudioClip[] LaunchClips
|
||||
[SkipSerialisation]
|
||||
An array of audio clips that are played randomly when something is launched. Can be null or empty if launchSound is set
|
||||
|
||||
public AudioSource launchAudioSource
|
||||
[SkipSerialisation]
|
||||
Reference to the audio source that plays the noises. The sound is played from the PhysicalBehaviour if this is null, which is usually fine.
|
||||
|
||||
public float ScreenShake
|
||||
Amount of screenshake when something is launched
|
||||
|
||||
public bool ShouldPutProjectileInOtherLayer
|
||||
Should the projectile be put on a different layer when created?
|
||||
|
||||
public int LayerToPutProjectileOn
|
||||
[Layer] [ShowIf(nameof(ShouldPutProjectileInOtherLayer))]
|
||||
The layer to put the projectile on if ShouldPutProjectileInOtherLayer is set to true
|
||||
|
||||
public UnityEngine.Events.UnityEvent OnLaunchEvent
|
||||
[SkipSerialisation]
|
||||
Unity event that is invoked when something is launched.
|
||||
|
||||
public bool RemoveLaunchedObjectsWithMe
|
||||
Should the behaviour destroy all launched objects when it itself is destroyed?
|
||||
|
||||
Methods
|
||||
public void Use(ActivationPropagation activation)
|
||||
No description provided
|
||||
|
||||
public void Launch()
|
||||
Launch the projectile
|
||||
|
||||
public Vector2 GetBarrelPosition()
|
||||
Get the barrel position in global space
|
||||
|
||||
public Vector2 GetBarrelDirection()
|
||||
Get the barrel direction is global space
|
||||
Reference in New Issue
Block a user