Skip to content

Struct ScreenImpact

One impact on a screen’s panel. The three values fix the crack pattern, so a saved impact given back to Damage draws the same picture.

Declaration
[Serializable]
public struct ScreenImpact
Declaration
[Tooltip("Where the panel was hit, as a UV on the screen: (0, 0) is the bottom left.")]
public Vector2 position
Declaration
[Tooltip("How hard, from 0 to 1.")]
[Range(0, 1)]
public float severity
Declaration
[Tooltip("Picks the crack pattern.")]
public int seed

Indicates whether the current object is equal to another object of the same type.

Declaration
public bool Equals(ScreenImpact other)

System.Boolean: true if the current object is equal to the other parameter; otherwise, false.

Type Name Description
DarkEffekt.Terminal.Unity.ScreenImpact other An object to compare with this object.

Indicates whether this instance and a specified object are equal.

Declaration
public override bool Equals(object obj)

System.Boolean: true if obj and this instance are the same type and represent the same value; otherwise, false.

Type Name Description
System.Object obj The object to compare with the current instance.

Returns the hash code for this instance.

Declaration
public override int GetHashCode()

System.Int32: A 32-bit signed integer that is the hash code for this instance.