public class LavaBehaviour
Inherits MonoBehaviour
Lava pool controller
Fields
public float LavaTemperature
Target temperature of objects that are in the lava
public Collider2D Trigger
The collider that the behaviour treats as the lava
public ContactFilter2D ContactFilter
The contact filter to decide what objects should be affected by the lava
public float TransferRate
The rate per second at which an object in the lava approaches the LavaTemperature
public float Dampening
[Range(0, 1)]
The amount of velocity dampening (0 - 1) that objects in the lava experience
public float Buoyancy
The amount of upward (depending on gravity) force applied to objects in the lava
public GameObject ImpactPrefab
The prefab that is instantiated when an object enters the lava for the first time
Methods
public void DoSplash(Vector2 point, float size)
Create a lava impact splash at the given location with the given size
public static bool IsPointInLava(Vector3 point)
Returns true if the given point is inside any lava pool and false otherwise.
public static LavaBehaviour GetLavaAtPoint(Vector3 point)
Returns the LavaBehaviour
that the point is in. Returns null
if the point does not overlap a lava pool.
public static bool TryGetLavaAtPoint(Vector3 point, out LavaBehaviour lava)
No description provided