public class GoreStringBehaviour
Inherits MonoBehaviour
Controls cosmetic tissue strings
Fields
public bool CreateJointOnStart
[SkipSerialisation]
Should the string joints be created on start?
public Color TissueColour
[SkipSerialisation]
What colour should the strings be?
public Rigidbody2D Other
[SkipSerialisation]
The rigidbody that is to be connected to
public float LineWidthMultiplier
[SkipSerialisation]
Width of the rendered strings
public float JointDampening
[SkipSerialisation]
Joint dampening ratio. Determines bounciness of the joints
public float JointFreq
[SkipSerialisation]
Joint stiffness, basically
public float JointBreakThreshold
[SkipSerialisation]
Amount of force required to fully sever the joint
public BloodContainer ColourSource
[SkipSerialisation]
Optional colour source liquid container.The computed colour of the contents of this liquid container will be multipliedwith the TissueColour
to get the final colourCan be null.
public LineSegment OtherLine
[SkipSerialisation]
The local space line segments to attach strings to and from
public SpringJoint2D Joint
[SkipSerialisation]
[System.NonSerialized]
The actual joint. Can be null.
public int LayerToDrawOn
[SkipSerialisation]
[NaughtyAttributes.Layer]
The layer to draw the lines on
public int RenderOrder
[SkipSerialisation]
The rendering order of the lines.
public float DepthOffset
[SkipSerialisation]
The depth offset of the lines
public float ViewOffset
[SkipSerialisation]
The view (z) offset of the lines
public AudioSource AudioSource
[SkipSerialisation]
Audio source to play snapping sounds from. Can be null if this object has a PhysicalBehaviour
public float InvincibilityTime
[SkipSerialisation]
Amount of seconds to wait after joint creation to make the joint actually destructible
public bool HadJointWhenSerialised
[NaughtyAttributes.ReadOnly]
Used for serialisation
public AudioClip[] TissueSnapClips
[SkipSerialisation]
Audio to play when a string snaps. Can be null.
Methods
public void CreateJoint()
Actually create the joints. This is usually handled by the component.
public void DestroyJoint()
Destroy the joints. Also handled by the component.